您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
adds "#" to URL, making YouTube reload once to avoid its sneaky error shit.
// ==UserScript== // @name Reload YouTube once // @namespace Mattari // @version 0.1 // @description adds "#" to URL, making YouTube reload once to avoid its sneaky error shit. // @include *.youtube.com/* // ==/UserScript== function redirect_yt() { if (!window.location.hash) { if (document.location.toString().indexOf("watch?v=") != -1) { window.location.replace(window.location.href+"#fix"); } } } var url = document.location.toString(); document.querySelector('html').addEventListener('DOMNodeInserted', function(ev){ var new_url = document.location.toString(); if (url == new_url) return; // already checked or processed url = new_url; redirect_yt() // run when URL changes }); setTimeout(() => { redirect_yt(); }, 1000);