您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
Remove unwanted sections from youtube search like 'For You', 'People Also Watched' etc.
// ==UserScript== // @name YouTube Search, remove unwanted sections // @namespace https://www.youtube.com/ // @version 0.1 // @description Remove unwanted sections from youtube search like 'For You', 'People Also Watched' etc. // @author Yilun Maa // @match *://www.youtube.com/results* // @grant none // @license MIT // ==/UserScript== (function() { 'use strict'; const url = new URL(window.location.href); const params = url.searchParams; if (params.has('search_query') && !params.has('sp')) { params.set('sp', 'CAASAhAB'); const newUrl = `${url.origin}${url.pathname}?${params.toString()}`; if (window.location.href !== newUrl) { window.location.replace(newUrl); } } })();