Skip to content

Instantly share code, notes, and snippets.

@SphinxKnight
Created June 5, 2018 21:26
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save SphinxKnight/904ba7a2f1e5e810e6d8dcc1de6e9f9d to your computer and use it in GitHub Desktop.
Save SphinxKnight/904ba7a2f1e5e810e6d8dcc1de6e9f9d to your computer and use it in GitHub Desktop.
ActiveHL WebExtension
{
"manifest_version": 2,
"name": "ActiveHL",
"version": "1.0",
"description": "Put the active tab in red.",
"permissions": ["theme","tabs"],
"background": {
"scripts": ["styling.js"]
}
}
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);
}
@SphinxKnight
Copy link
Author

Licence: CC-0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment