1
0

Fix für Serienfans

This commit is contained in:
Akamaru
2025-09-30 19:30:05 +02:00
parent 35964c1cf4
commit 56ec1da75b

View File

@@ -1,7 +1,7 @@
// ==UserScript==
// @name Serienfans/Filmfans Releasegruppen Filter
// @namespace https://git.ponywave.de/Akamaru/Userscripts
// @version 1.0
// @version 1.1
// @description Blende Uploads bestimmter Releasegruppen aus
// @author Akamaru
// @match https://serienfans.org/*
@@ -79,24 +79,31 @@
const entries = document.querySelectorAll('.entry');
entries.forEach(entry => {
const audiotags = entry.querySelectorAll('.audiotag');
let releasegroup = null;
// Finde die Releasegruppe
audiotags.forEach(tag => {
const small = tag.querySelector('small');
if (small && small.textContent.includes('Releasegruppe:')) {
releasegroup = tag.textContent.replace('Releasegruppe:', '').trim();
if (blacklist.some(blocked => blocked.toLowerCase() === releasegroup.toLowerCase())) {
entry.style.display = 'none';
const checkbox = entry.previousElementSibling;
if (checkbox && checkbox.classList.contains('show_nfo')) {
checkbox.style.display = 'none';
}
// Methode 1: Serienfans/Filmfans - <span class="grouptag">
const grouptag = entry.querySelector('.grouptag');
if (grouptag) {
releasegroup = grouptag.textContent.trim();
} else {
// Methode 2: Ältere Struktur - .audiotag mit "Releasegruppe:"
const audiotags = entry.querySelectorAll('.audiotag');
audiotags.forEach(tag => {
const small = tag.querySelector('small');
if (small && small.textContent.includes('Releasegruppe:')) {
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
if (releasegroup && !entry.querySelector('.block-group-btn')) {