mirror of
https://github.com/kkapsner/CanvasBlocker
synced 2025-07-15 14:09:36 +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
|
@ -1,12 +0,0 @@
|
|||
body {
|
||||
background-color: rgb(74, 74, 79);
|
||||
color: rgb(249, 249, 250);
|
||||
}
|
||||
|
||||
.action {
|
||||
border-color: rgb(92, 92, 97);
|
||||
}
|
||||
|
||||
.action:active, .action:hover, .action:focus {
|
||||
background-color: rgb(92, 92, 97);
|
||||
}
|
|
@ -1,12 +0,0 @@
|
|||
body {
|
||||
color: rgb(60, 62, 60);
|
||||
background-color: rgb(249, 250, 249);
|
||||
}
|
||||
|
||||
.action {
|
||||
border-color: rgb(185, 185, 185);
|
||||
}
|
||||
|
||||
.action:active, .action:hover, .action:focus {
|
||||
background-color: rgb(236, 237, 236);
|
||||
}
|
|
@ -1,12 +0,0 @@
|
|||
body {
|
||||
color: rgb(12, 12, 13);
|
||||
background-color: rgb(255, 255, 255);
|
||||
}
|
||||
|
||||
.action {
|
||||
border-color: rgb(222, 222, 222);
|
||||
}
|
||||
|
||||
.action:active, .action:hover, .action:focus {
|
||||
background-color: rgb(240, 240, 240);
|
||||
}
|
|
@ -10,7 +10,9 @@ div {
|
|||
.action {
|
||||
display: block;
|
||||
padding: 0.5em;
|
||||
margin: 0;
|
||||
background-color: transparent;
|
||||
background-image: none;
|
||||
border: 1px solid currentColor;
|
||||
cursor: pointer;
|
||||
width: 100%;
|
||||
|
|
|
@ -13,6 +13,7 @@
|
|||
<script src="../lib/settingDefinitions.js"></script>
|
||||
<script src="../lib/settingContainers.js"></script>
|
||||
<script src="../lib/settings.js"></script>
|
||||
<script src="../lib/theme.js"></script>
|
||||
<script src="browserAction.js"></script>
|
||||
</body>
|
||||
</html>
|
|
@ -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