您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
Remove YouTube recommendations and redirect shorts to the main YouTube viewer.
// ==UserScript== // @name Remove YouTube Shorts and Recommendations // @namespace Violentmonkey Scripts // @match https://*.youtube.com/* // @grant none // @version 1.0.1 // @run-at document-end // @author Kalavian // @license MIT // @description Remove YouTube recommendations and redirect shorts to the main YouTube viewer. // @noframes // ==/UserScript== // trying to program at 2:40 am goes hard :3 also trans rights :3 if(window.location.href.includes("shorts/")){ window.location = window.location.href.replace("shorts/","watch?v="); } window.onload = function(){ let successfullyRemoved = false; let removeAttempts = 0; const removeRecommendations = setInterval(function(){ try { document.getElementById("secondary").remove(); successfullyRemoved=true; } catch { successfullyRemoved=false; } finally { if(successfullyRemoved){ clearInterval(removeRecommendations); } } removeAttempts++; if(removeAttempts>100){ clearInterval(removeRecommendations); alert("Could not remove recommendations"); } }, 50); }