diff --git a/YouTube - YouTube to Invidious.user.js b/YouTube - YouTube to Invidious.user.js new file mode 100644 index 0000000..5546625 --- /dev/null +++ b/YouTube - YouTube to Invidious.user.js @@ -0,0 +1,35 @@ +// ==UserScript== +// @name YouTube - YouTube to Invidious +// @namespace youtube-to-invidious +// @match *://*.youtube.com/* +// @version 1 +// @grant none +// ==/UserScript== + +var invidiousInstance = "https://invidio.xamh.de" + +var toYouTube = function() { + sessionStorage.setItem("yti-visityt",true) + location.reload() +} + +var main = function() { + if (sessionStorage.getItem("yti-visityt") !== null) { + sessionStorage.removeItem("yti-visityt") + return + } + document.body.innerHTML = ` +
+

YouTube to Invidious

+
+Should Invidious not work, click "Back" in your browser, and then choose "To YouTube"
+
+To get back to this site:
+From Invidious: Click "Watch on YouTube" or click a YouTube-icon
+From YouTube: Reload page +
+` + document.getElementById("toYouTube").onclick = toYouTube +} + +main() \ No newline at end of file