aboutsummaryrefslogtreecommitdiffstats
path: root/scripts-greasemonkey
diff options
context:
space:
mode:
authorJesús <heckyel@hyperbola.info>2019-10-10 22:45:24 -0500
committerJesús <heckyel@hyperbola.info>2019-10-10 22:45:24 -0500
commit35b9d8c42ed6b51449b3ae2b63ff6be79ef67989 (patch)
tree75235ccc2ab3d382b04051cffcb5cb77ec4c7cb7 /scripts-greasemonkey
parent725f7bac0ec3ae6f42792bd46374242381ee56b0 (diff)
downloadbook-35b9d8c42ed6b51449b3ae2b63ff6be79ef67989.tar.lz
book-35b9d8c42ed6b51449b3ae2b63ff6be79ef67989.tar.xz
book-35b9d8c42ed6b51449b3ae2b63ff6be79ef67989.zip
Added Invidio Dark-Mode
Diffstat (limited to 'scripts-greasemonkey')
-rw-r--r--scripts-greasemonkey/README.md3
-rw-r--r--scripts-greasemonkey/invidio_dark_mode.user.js30
2 files changed, 32 insertions, 1 deletions
diff --git a/scripts-greasemonkey/README.md b/scripts-greasemonkey/README.md
index 15460af..9122ef7 100644
--- a/scripts-greasemonkey/README.md
+++ b/scripts-greasemonkey/README.md
@@ -1,3 +1,4 @@
# List Scripts
-[Invidious Redirect](https://libregit.org/heckyel/book/raw/branch/master/scripts-greasemonkey/Youtube_to_Invidious.user.js)
+- [Invidious Redirect](https://libregit.org/heckyel/book/raw/branch/master/scripts-greasemonkey/Youtube_to_Invidious.user.js)
+- [Invidious Dark-Mode](https://libregit.org/heckyel/book/raw/branch/master/scripts-greasemonkey/invidio_dark_mode.user.js)
diff --git a/scripts-greasemonkey/invidio_dark_mode.user.js b/scripts-greasemonkey/invidio_dark_mode.user.js
new file mode 100644
index 0000000..18851dc
--- /dev/null
+++ b/scripts-greasemonkey/invidio_dark_mode.user.js
@@ -0,0 +1,30 @@
+// ==UserScript==
+// @name Invidious - Dark Mode
+// @version 1.01
+// @author ace2k
+// @license GPL-3.0
+// @description This script automatically toggles dark mode on Invidious and its various public instances.
+// @namespace https://gitlab.com/ace2k
+// @supportURL https://gitlab.com/ace2k/userscripts
+// @include /^http(s|)://(www\.|)invidio\.us/.*$/
+// @include /^http(s|)://(www\.|)invidious\.snopyta\.org/.*$/
+// @include /^http(s|)://(www\.|)invidious\.snopyta\.org/.*$/
+// @include /^http(s|)://(www\.|)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\.|)invidious\.enkirton\.net/.*$/
+// @include /^http(s|)://(www\.|)tube\.poal\.co/.*$/
+// @include /^http(s|)://(www\.|)invidious\.13ad\.de/.*$/
+// @grant none
+// ==/UserScript==
+
+(function switchMode() {
+ 'use strict';
+ var consoleCSS = 'background: #000; color: #00FF00; padding: 0px 7px; border: 1px solid #00FF00; line-height: 16px;';
+ var defaultMode = document.getElementsByClassName('ion-ios-moon')[0];
+ if (defaultMode != null) {
+ defaultMode.click();
+ console.log("%cUSERSCRIPT | " + GM_info.script.name + " " + GM_info.script.version + " | successfully initialized", consoleCSS);
+ }
+})();