Created
January 22, 2019 21:26
-
-
Save quasicomputational/ec09c7c71ea6bbfa2be513c67fa7c8a9 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
browser.browserAction.onClicked.addListener(() => { | |
browser.tabs.query({ active: true }) | |
.then((tabs) => { | |
for (tab of tabs) { | |
browser.tabs.update(tab.id, { url: "/test.html" }); | |
} | |
}); | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ "manifest_version": 2 | |
, "name": "Test" | |
, "version": "1.0" | |
, "browser_action": | |
{ "browser_style": true | |
, "default_icon": "icon.svg" | |
} | |
, "background": | |
{ "scripts": ["background.js"] | |
} | |
, "permissions": | |
[ "activeTab" | |
] | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<script src=test.js></script> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
window.location.replace("https://example.com"); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment