mirror of
https://github.com/kkapsner/CanvasBlocker
synced 2025-07-04 20:46:39 +02:00
Added centralized theme system and themed all pages
This commit is contained in:
parent
c2a817478e
commit
6301b744d2
39 changed files with 448 additions and 127 deletions
|
@ -7,19 +7,10 @@
|
|||
const extension = require("../lib/extension");
|
||||
const logging = require("../lib/logging");
|
||||
const settings = require("../lib/settings");
|
||||
require("../lib/theme").init("browserAction");
|
||||
logging.message("Opened browser action");
|
||||
|
||||
settings.onloaded(function(){
|
||||
// load theme
|
||||
var themeLink = document.createElement("link");
|
||||
themeLink.href = `browserAction-${settings.theme}.css`;
|
||||
themeLink.rel = "stylesheet";
|
||||
themeLink.type = "text/css";
|
||||
document.head.appendChild(themeLink);
|
||||
settings.on("theme", function(){
|
||||
themeLink.href = `browserAction-${settings.theme}.css`;
|
||||
});
|
||||
|
||||
var actions = document.getElementById("actions");
|
||||
|
||||
[
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue