flash.moe/public/userscripts/remove-trending-tab.user.js
2022-02-04 04:25:57 +00:00

18 lines
584 B
JavaScript

// ==UserScript==
// @name Remove Trending tab
// @version 7
// @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"], [href="/channel/UCqVDpXKLmKeBU_yyt_QkItQ"]'));
if(buttons.length) {
while(buttons.length)
buttons.pop().parentElement.remove();
clearInterval(checkInterval);
}
}, 100);
});