mirror of
https://github.com/NohamR/BetterYGG.git
synced 2026-01-10 00:08: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:
@@ -46,3 +46,10 @@ Ajustements mineurs:
|
|||||||
[1.2.9]
|
[1.2.9]
|
||||||
- Mise à jour vers yggtorrent.org
|
- Mise à jour vers yggtorrent.org
|
||||||
- Utilisation de yggapi.eu pour le téléchargement des torrents
|
- 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"
|
||||||
|
|||||||
@@ -7,6 +7,36 @@ if (popup && popup.style.display !== "none") {
|
|||||||
document.querySelector('button.ad-alert-message-continue-btn').click();
|
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*/
|
/* Retrieve credentials from Google Storage*/
|
||||||
chrome.storage.sync.get(['searchOrder', 'searchSort'], function (value) {
|
chrome.storage.sync.get(['searchOrder', 'searchSort'], function (value) {
|
||||||
/* Update links to order and filter them with our values */
|
/* Update links to order and filter them with our values */
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "BetterYGG",
|
"name": "BetterYGG",
|
||||||
"version": "1.2.9",
|
"version": "1.3.0",
|
||||||
"description": "Téléchargez des torrents sur YGG sans ètre connecté et autres !!!",
|
"description": "Téléchargez des torrents sur YGG sans ètre connecté et autres !!!",
|
||||||
"icons": {
|
"icons": {
|
||||||
"16": "img/flexgg16.png",
|
"16": "img/flexgg16.png",
|
||||||
|
|||||||
Reference in New Issue
Block a user