From 8e1d4e8fa83906a841c254b202f94659d1cee7a7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E2=88=9A=28noham=29=C2=B2?= <100566912+NohamR@users.noreply.github.com> Date: Tue, 23 Dec 2025 23:49:03 +0100 Subject: [PATCH] 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 --- README.md | 7 +++++++ contentScripts/allPages/allPages.js | 30 +++++++++++++++++++++++++++++ manifest.json | 2 +- 3 files changed, 38 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 4f932c0..a1eecaa 100644 --- a/README.md +++ b/README.md @@ -46,3 +46,10 @@ Ajustements mineurs: [1.2.9] - Mise à jour vers yggtorrent.org - Utilisation de yggapi.eu pour le téléchargement des torrents + +[1.3] +- Suppression des éléments promotionnels : + - Élément "Compte Actif" avec lien donation + - Message de limite de téléchargements quotidiens + - Liens de promotion "Turbo" + - Bannière "Bonus Go & Freeleech" diff --git a/contentScripts/allPages/allPages.js b/contentScripts/allPages/allPages.js index 80939f5..9bcb8ee 100644 --- a/contentScripts/allPages/allPages.js +++ b/contentScripts/allPages/allPages.js @@ -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 */ diff --git a/manifest.json b/manifest.json index 35c3e20..416e3e0 100644 --- a/manifest.json +++ b/manifest.json @@ -1,6 +1,6 @@ { "name": "BetterYGG", - "version": "1.2.9", + "version": "1.3.0", "description": "Téléchargez des torrents sur YGG sans ètre connecté et autres !!!", "icons": { "16": "img/flexgg16.png",