12345678910111213141516171819202122232425262728293031323334353637 |
- // ==UserScript==
- // @name Invidious - Dark Mode
- // @version 1.1.7
- // @author Jesús E.
- // @license GPL version 3 or any later version::: https://www.gnu.org/licenses/gpl-3.0.html
- // @description This script automatically toggles dark mode on Invidious and its various public instances.
- // @namespace InvidiousDark
- // @homepageURL https://git.sr.ht/~heckyel/book/blob/master/scripts-greasemonkey
- // @include /^http(s|)://(www[.]|)invidio[.]us/.*$/
- // @include /^http(s|)://(www[.]|proxy[.]|)invidious[.]snopyta[.]org/.*$/
- // @include /^http(s|)://(www[.]|)vid[.]wxzm[.]sx/.*$/
- // @include /^http(s|)://(www[.]|)invidious[.]kabi[.]tk/.*$/
- // @include /^http(s|)://(www[.]|)invidiou[.]sh/.*$/
- // @include /^http(s|)://(www[.]|)yewtu[.]be/.*$/
- // @include /^http(s|)://(www[.]|)invidious[.]ggc-project[.]de/.*$/
- // @include /^http(s|)://(www[.]|)invidious[.]enkirton[.]net/.*$/
- // @include /^http(s|)://(www[.]|)tube[.]poal[.]co/.*$/
- // @include /^http(s|)://(www[.]|)invidious[.]13ad[.]de/.*$/
- // @include /^http(s|)://(www[.]|)invidious[.]drycat[.]fr/.*$/
- // @grant none
- // ==/UserScript==
- window.addEventListener('load', () => {
- const consoleCSS = 'background: #000; color: #00FF00; padding: 0px 7px; border: 1px solid #00FF00; line-height: 16px;';
- const name = GM_info.script.name;
- const version = GM_info.script.version;
- const log = (...args) => console.log('%cUSERSCRIPT | %s %s | %s', consoleCSS, name, version, ...args);
- log('successfully initialized');
- let defaultMode = document.getElementsByClassName('ion-ios-moon')[0];
- if (defaultMode != null) {
- defaultMode.click();
- log('Dark theme ready!');
- }
- });
|