Fix für Serienfans
This commit is contained in:
@@ -1,7 +1,7 @@
|
|||||||
// ==UserScript==
|
// ==UserScript==
|
||||||
// @name Serienfans/Filmfans Releasegruppen Filter
|
// @name Serienfans/Filmfans Releasegruppen Filter
|
||||||
// @namespace https://git.ponywave.de/Akamaru/Userscripts
|
// @namespace https://git.ponywave.de/Akamaru/Userscripts
|
||||||
// @version 1.0
|
// @version 1.1
|
||||||
// @description Blende Uploads bestimmter Releasegruppen aus
|
// @description Blende Uploads bestimmter Releasegruppen aus
|
||||||
// @author Akamaru
|
// @author Akamaru
|
||||||
// @match https://serienfans.org/*
|
// @match https://serienfans.org/*
|
||||||
@@ -79,24 +79,31 @@
|
|||||||
const entries = document.querySelectorAll('.entry');
|
const entries = document.querySelectorAll('.entry');
|
||||||
|
|
||||||
entries.forEach(entry => {
|
entries.forEach(entry => {
|
||||||
const audiotags = entry.querySelectorAll('.audiotag');
|
|
||||||
let releasegroup = null;
|
let releasegroup = null;
|
||||||
|
|
||||||
// Finde die Releasegruppe
|
// Methode 1: Serienfans/Filmfans - <span class="grouptag">
|
||||||
audiotags.forEach(tag => {
|
const grouptag = entry.querySelector('.grouptag');
|
||||||
const small = tag.querySelector('small');
|
if (grouptag) {
|
||||||
if (small && small.textContent.includes('Releasegruppe:')) {
|
releasegroup = grouptag.textContent.trim();
|
||||||
releasegroup = tag.textContent.replace('Releasegruppe:', '').trim();
|
} else {
|
||||||
|
// Methode 2: Ältere Struktur - .audiotag mit "Releasegruppe:"
|
||||||
if (blacklist.some(blocked => blocked.toLowerCase() === releasegroup.toLowerCase())) {
|
const audiotags = entry.querySelectorAll('.audiotag');
|
||||||
entry.style.display = 'none';
|
audiotags.forEach(tag => {
|
||||||
const checkbox = entry.previousElementSibling;
|
const small = tag.querySelector('small');
|
||||||
if (checkbox && checkbox.classList.contains('show_nfo')) {
|
if (small && small.textContent.includes('Releasegruppe:')) {
|
||||||
checkbox.style.display = 'none';
|
releasegroup = tag.textContent.replace('Releasegruppe:', '').trim();
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
// Prüfe ob Releasegruppe geblockt werden soll
|
||||||
|
if (releasegroup && blacklist.some(blocked => blocked.toLowerCase() === releasegroup.toLowerCase())) {
|
||||||
|
entry.style.display = 'none';
|
||||||
|
const checkbox = entry.previousElementSibling;
|
||||||
|
if (checkbox && checkbox.tagName === 'INPUT') {
|
||||||
|
checkbox.style.display = 'none';
|
||||||
}
|
}
|
||||||
});
|
}
|
||||||
|
|
||||||
// Füge Block-Button hinzu, wenn noch nicht vorhanden
|
// Füge Block-Button hinzu, wenn noch nicht vorhanden
|
||||||
if (releasegroup && !entry.querySelector('.block-group-btn')) {
|
if (releasegroup && !entry.querySelector('.block-group-btn')) {
|
||||||
|
|||||||
Reference in New Issue
Block a user