This topic is now archived and is closed to further replies.


need help with small converting

Recommended Posts

Hi everyone,

Need an example code for the follow problem but for the Maxthon extension.

1. Send a message from the script to the background page

In Chrome it's this:

inject.js scriptchrome.extension.sendMessage({'name' : 'automatic', 'value' : value});background page:chrome.extension.onMessage.addListener(function request(request,sender,sendResponse){

if ( == "automatic") {chrome.tabs.executeScript(, {file: "js/light.js"});}

else if ( == "readerlargestyle") {/* save a thing */}

});2. when the extension is installed, in the "background page" it must run a code, to show a "welcome" page. (for new users)



Share this post

Link to post
Share on other sites