Created
June 5, 2018 21:26
-
-
Save SphinxKnight/904ba7a2f1e5e810e6d8dcc1de6e9f9d to your computer and use it in GitHub Desktop.
ActiveHL WebExtension
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": "ActiveHL", | |
"version": "1.0", | |
"description": "Put the active tab in red.", | |
"permissions": ["theme","tabs"], | |
"background": { | |
"scripts": ["styling.js"] | |
} | |
} |
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
var querying = browser.tabs.query({currentWindow: true, active: true}); | |
querying.then(updateStyle, onError); | |
function onError(e){ | |
console.error(e.message); | |
} | |
function updateStyle(){ | |
var theme = { | |
"colors": { | |
"accentcolor": "#black", | |
"textcolor": "white", | |
"tab_selected": "red" | |
} } | |
browser.theme.update(theme); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Licence: CC-0