diff --git a/config/qutebrowser/greasemonkey/let-there-be-light.user.js b/config/qutebrowser/greasemonkey/let-there-be-light.user.js new file mode 100644 index 00000000..09de60e8 --- /dev/null +++ b/config/qutebrowser/greasemonkey/let-there-be-light.user.js @@ -0,0 +1,12 @@ +// ==UserScript== +// @name Let there be Light +// @description Change page background to white. +// @version 0.1 +// @author Ingvix +// @include * +// ==/UserScript== + +// Needed to counterbalance my colors.webpage.bg hack to prevent the blinding +// flash of white between page loads. +var sheet = window.document.styleSheets[0]; +sheet.insertRule('body { background-color: white; }', sheet.cssRules.length); diff --git a/modules/themes/alucard/config/qutebrowser/theme.py b/modules/themes/alucard/config/qutebrowser/theme.py index b33256d1..1334fb1c 100644 --- a/modules/themes/alucard/config/qutebrowser/theme.py +++ b/modules/themes/alucard/config/qutebrowser/theme.py @@ -31,6 +31,11 @@ padding = { 'left': spacing['horizontal'] } +# HACK This is set to mitigate the blinding flash of white in between page +# loads. This can break sites with no explicit background, so I rely on the +# let-there-be-light.user.js greasemonkey script to "reset" the background. +c.colors.webpage.bg = palette['background'] + ## UI # Scrollbar style; much less intrusive than the default c.scrolling.bar = "overlay"