Config to set custom global CSS

pull/286/head
Thomas Buckley-Houston 2019-06-18 12:54:29 +03:00
rodzic c7ddd91d25
commit 31def7cc30
2 zmienionych plików z 15 dodań i 0 usunięć

Wyświetl plik

@ -22,6 +22,14 @@ websocket-port = 3334
# then this experimental feature should help. It can also be toggled in-browser with F6.
use_experimental_text_visibility = false
# Custom CSS to apply to all loaded tabs, eg;
# custom_css = """
# body {
# background-colour: black;
# }
# """
custom_css = ""
[firefox]
# The path to your Firefox binary
path = "firefox"

Wyświetl plik

@ -191,6 +191,7 @@ export default class extends utils.mixins(CommonMixin, CommandsMixin) {
this.is_dom_loaded = true;
this.log("DOM LOADED");
this._fixStickyElements();
this._injectCustomCSS();
this._willHideText();
});
window.addEventListener("load", () => {
@ -251,4 +252,10 @@ export default class extends utils.mixins(CommonMixin, CommandsMixin) {
}
}
}
_injectCustomCSS() {
var node = document.createElement("style");
node.innerHTML = this.config.browsh.custom_css;
document.body.appendChild(node);
}
}