Hellosct1 webext (#237)

* README.md

1st commit

* New demo with devtools and the webextensions

* evolution script example

* Remove commented out code, to see if it triggers a Travis build

* Updated README; added more descriptive labels for buttons

* Added some comments

* update evolution

* correction

* correction next

* correction next

* update script for jquery

* update part jquery in the devtools

* Remove jQuery check from handleResult
This commit is contained in:
hellosct1
2017-07-28 00:11:16 +02:00
committed by wbamberg
parent f4e470509a
commit b488b5b905
8 changed files with 193 additions and 0 deletions

View File

@@ -0,0 +1,23 @@
/**
When we receive the message, execute the given script in the given
tab.
*/
function handleMessage(request, sender, sendResponse) {
if (sender.url != browser.runtime.getURL("/devtools/panel/panel.html")) {
return;
}
browser.tabs.executeScript(
request.tabId,
{
code: request.script
});
}
/**
Listen for messages from our devtools panel.
*/
browser.runtime.onMessage.addListener(handleMessage);