kopia lustrzana https://github.com/browsh-org/browsh
Config to set custom global CSS
rodzic
c7ddd91d25
commit
31def7cc30
|
@ -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"
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
|
Ładowanie…
Reference in New Issue