Greasy Fork

Greasy Fork is available in English.

Remove blocked films/series on Jelleseerr

Remove blocked films/series from search results

当前为 2024-11-28 提交的版本,查看 最新版本

// ==UserScript==
// @name            Remove blocked films/series on Jelleseerr
// @name:ru         Удаляет заблокированные фильмы/сериалы в Jelleseerr
// @namespace       http://tampermonkey.net/
// @version         1.1
// @description     Remove blocked films/series from search results
// @description:ru  Удаляет из выдачи заблокированные фильмы/сериалы
// @author          Shaman_Lesnoy
// @match           your.domain
// @grant           none
// @license         GPL-3.0
// ==/UserScript==

(function() {
    'use strict';
     //Configuration
    // Конфигурация
    const config = {
        ignoreLinks: ["https://your.domain/blacklist"], // ignore blacklist page
        targetClass: "w-full",
        nestedClass: "flex flex-col items-center gap-1"
    };

    const observer = new MutationObserver(() => {
        document.querySelectorAll(`.${config.targetClass}`).forEach(el => {
            if (el.querySelector(`.${config.nestedClass}`) && !config.ignoreLinks.some(link => el.closest(`a[href="${link}"]`))) {
                el.remove();
            }
        });
    });

    observer.observe(document.body, { childList: true, subtree: true });
})();