Move userscripts into scripts/ subfolder

This commit is contained in:
2026-07-09 08:26:18 -04:00
parent b4f6cfeea7
commit 39d24d3ea9
12 changed files with 1 additions and 1 deletions
+25
View File
@@ -0,0 +1,25 @@
// ==UserScript==
// @name Yattee Redirect
// @version 0.0.3
// @updateURL https://gist.github.com/evanreichard/8db561c7be7a6c308db18ce3e983c8d6/raw/yattee-redirect.user.js
// @match https://www.youtube.com/*
// @match https://m.youtube.com/*
// @grant none
// @noframes
// @run-at document-start
// ==/UserScript==
function attemptRedirect(){
if (document.location.pathname == "/watch") {
let newPath = document.location.href.split("https://" + document.location.host + "/")[1];
document.location.href = "yattee://" + newPath
}
}
var pushState = history.pushState;
history.pushState = function () {
pushState.apply(history, arguments);
attemptRedirect();
};
attemptRedirect();