[invidio_proxy_mode.user.js] Support Abrowser

Fix personal-script load after javascript loading from the DOM,
reported by a Trisquel user in Abrowser.
This commit is contained in:
Jesús 2019-10-18 18:40:33 -05:00
parent cc3ba2cc61
commit e65d2d7491
No known key found for this signature in database
GPG Key ID: F6EE7BC59A315766

View File

@ -18,7 +18,7 @@
// @grant none // @grant none
// ==/UserScript== // ==/UserScript==
(function proxyMode() { function proxyMode() {
const consoleCSS = 'background: #000; color: #00FF00; padding: 0px 7px; border: 1px solid #00FF00; line-height: 16px;'; const consoleCSS = 'background: #000; color: #00FF00; padding: 0px 7px; border: 1px solid #00FF00; line-height: 16px;';
// Set variables // Set variables
@ -42,4 +42,10 @@
} }
} }
console.log("%cUSERSCRIPT | " + GM_info.script.name + " " + GM_info.script.version + " | successfully initialized", consoleCSS); console.log("%cUSERSCRIPT | " + GM_info.script.name + " " + GM_info.script.version + " | successfully initialized", consoleCSS);
})(); }
proxyMode();
// Fix Abrowser
window.addEventListener('load', () => {
proxyMode();
});