Remove premium and promo elements from YggTorrent UI

Adds logic to remove 'Compte Actif' premium status, download limits, Turbo promotion, and 'Bonus Go & Freeleech' links
This commit is contained in:
√(noham)²
2025-12-23 23:49:03 +01:00
parent fffa4ef64c
commit 8e1d4e8fa8
3 changed files with 38 additions and 1 deletions

View File

@@ -7,6 +7,36 @@ if (popup && popup.style.display !== "none") {
document.querySelector('button.ad-alert-message-continue-btn').click();
}
/* Remove "Compte Actif" premium status element */
var compteActifElement = document.querySelector('li a[href="https://www.yggtorrent.org/user/donate"]');
if (compteActifElement) {
var liElement = compteActifElement.closest('li');
if (liElement) {
liElement.remove();
}
}
/* Remove download limits and Turbo promotion */
var downloadLimits = document.querySelectorAll('small');
downloadLimits.forEach(function(small) {
if (small.textContent.includes('Téléchargements restants aujourd\'hui')) {
small.remove();
}
});
var turboLinks = document.querySelectorAll('a[href="https://www.yggtorrent.org/user/turbo"]');
turboLinks.forEach(function(link) {
if (link.querySelector('.ico_bolt')) {
link.remove();
}
});
/* Remove "Bonus Go & Freeleech" promotion link */
var bonusGoLink = document.querySelector('a.donate.pulse[href="https://www.yggtorrent.org/user/donate"]');
if (bonusGoLink) {
bonusGoLink.remove();
}
/* Retrieve credentials from Google Storage*/
chrome.storage.sync.get(['searchOrder', 'searchSort'], function (value) {
/* Update links to order and filter them with our values */