Last active
April 2, 2025 07:45
-
-
Save skyghis/28558a62192e10538f262f5775cb24ed to your computer and use it in GitHub Desktop.
Remove YggTorrent donation popup
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ==UserScript== | |
// @name Ygg remove donation popup and button | |
// @version 1.7.3 | |
// @description Remove YggTorrent donation popup | |
// @namespace https://gist.github.com/skyghis/28558a62192e10538f262f5775cb24ed | |
// @updateURL https://gist.github.com/skyghis/28558a62192e10538f262f5775cb24ed/raw | |
// @match https://*ygg.*/* | |
// @match https://*yggtorrent.*/* | |
// @icon https://www.yggtorrent.top/favicon.ico | |
// @author SkyghiS | |
// @homepageURL https://gist.github.com/skyghis/28558a62192e10538f262f5775cb24ed | |
// @run-at document-idle | |
// ==/UserScript== | |
function removeElement(el, reSelector) { | |
//console.log("el=", el); | |
let e = document.querySelector(el); | |
//console.log("e=", e); | |
if (e && reSelector) { | |
e = reSelector(e); | |
} | |
if (e instanceof HTMLElement) { | |
e.remove(); | |
} else { | |
//console.log("not found", el); | |
} | |
} | |
// Remove donate button at right of search bar | |
removeElement("a.donate.pulse"); | |
// Left sidebar "Regarder la TV + freeleech" | |
removeElement("#cat li.misc"); | |
// Top tab "Regarder la TV" | |
removeElement("#top nav li a[href='https://terraiptv.com/']", e => e.parentElement); | |
// Remove promo popup | |
[...document.querySelectorAll("div.promo-close")] | |
.filter(popup => popup && popup.style.display !== "none") | |
.forEach(popup => popup.click()); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment