mirror of
https://github.com/NohamR/BetterYGG.git
synced 2026-01-10 08:18:19 +00:00
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:
@@ -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 */
|
||||
|
||||
Reference in New Issue
Block a user