helm/config/qutebrowser/greasemonkey/per-domain-stylesheets.user.js
2020-01-04 00:13:46 -05:00

22 lines
598 B
JavaScript

// ==UserScript==
// @name DomainStyles
// @namespace https://github.com/hlissner
// @description Make it possible to use per-domain stylesheets.
// @include *
// @run-at document-start
// @version 1
// @author Henrik Lissner
// ==/UserScript==
(function IIFE() {
'use strict';
document.addEventListener('readystatechange', function onReadyStateChange() {
if (document.readyState == 'interactive') {
const doc = document.documentElement;
doc.setAttribute('qb-url', window.location.href);
doc.setAttribute('qb-domain', window.location.host);
}
});
})();