1
0
Fork 0
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:
kkapsner 2019-05-02 00:30:30 +02:00
parent c2a817478e
commit 6301b744d2
39 changed files with 448 additions and 127 deletions

View file

@ -1,24 +0,0 @@
body {
background-color: rgb(74, 74, 79);
color: rgb(249, 249, 250);
}
.collapsible .collapser {
color: rgb(120, 145, 255);
}
.hasHiddenActions {
color: rgb(182, 194, 245);
}
.hasHiddenActions:hover, .hasHiddenActions .actions {
background-color: rgb(92, 92, 97);
}
.modal button {
border-color: rgb(92, 92, 97);
}
.modal button:active, .modal button:hover, .modal button:focus {
background-color: rgb(92, 92, 97);
}

View file

@ -1,24 +0,0 @@
body {
color: rgb(60, 62, 60);
background-color: rgb(249, 250, 249);
}
.collapsible .collapser {
color: blue;
}
.hasHiddenActions {
color: darkblue;
}
.hasHiddenActions:hover, .hasHiddenActions .actions {
background-color: rgb(236, 237, 236);
}
.modal button {
border-color: rgb(236, 237, 236);
}
.modal button:active, .modal button:hover, .modal button:focus {
background-color: rgb(236, 237, 236);
}

View file

@ -1,24 +0,0 @@
body {
color: rgb(12, 12, 13);
background-color: rgb(255, 255, 255);
}
.collapsible .collapser {
color: blue;
}
.hasHiddenActions {
color: darkblue;
}
.hasHiddenActions:hover, .hasHiddenActions .actions {
background-color: rgb(240, 240, 240);
}
.modal button {
border-color: rgb(240, 240, 240);
}
.modal button:active, .modal button:hover, .modal button:focus {
background-color: rgb(240, 240, 240);
}

View file

@ -24,6 +24,7 @@ button.action.isIcon {
margin: 0;
line-height: 0;
background-color: transparent;
background-image: none;
}
* + button.action.isIcon {
margin-left: 1px;

View file

@ -18,6 +18,7 @@
<script src="../lib/settings.js"></script>
<script src="../lib/lists.js"></script>
<script src="../lib/callingStack.js"></script>
<script src="../lib/theme.js"></script>
<script src="gui.js"></script>
<script src="domainNotification.js"></script>
<script src="notification.js"></script>

View file

@ -14,21 +14,12 @@
const Notification = require("./Notification");
const {createActionButtons, modalPrompt, modalChoice} = require("./gui");
const lists = require("../lib/lists");
require("../lib/theme").init("pageAction");
Promise.all([
browser.tabs.query({active: true, currentWindow: true}),
settings.loaded
]).then(function(values){
// load theme
var themeLink = document.createElement("link");
themeLink.href = `pageAction-${settings.theme}.css`;
themeLink.rel = "stylesheet";
themeLink.type = "text/css";
document.head.appendChild(themeLink);
settings.on("theme", function(){
themeLink.href = `pageAction-${settings.theme}.css`;
});
const tabs = values[0];
notice("create global action buttons");