flash.moe/public/userscripts/remove-trending-tab.user.js
2021-07-07 01:13:50 +00:00

18 lines
541 B
JavaScript

// ==UserScript==
// @name Removed Trending tab
// @version 6
// @grant none
// @include https://www.youtube.com/*
// ==/UserScript==
window.addEventListener('load', function() {
var checkInterval = setInterval(function() {
var buttons = Array.from(document.querySelectorAll('[href="/feed/explore"], [href="/feed/trending"]'));
if(buttons.length) {
while(buttons.length)
buttons.pop().parentElement.remove();
clearInterval(checkInterval);
}
}, 100);
});