Greasy Fork

ESJ Zone: Blurs NSFW Covers

Blurs the covers of NSFW novels on ESJ Zone.

目前为 2023-07-26 提交的版本。查看 最新版本

// ==UserScript==
// @name               ESJ Zone: Blurs NSFW Covers
// @name:zh-TW         ESJ Zone:模糊 18+ 封面
// @description        Blurs the covers of NSFW novels on ESJ Zone.
// @description:zh-TW  模糊 ESJ Zone 18+ 小說的封面。
// @icon               https://icons.duckduckgo.com/ip3/www.esjzone.cc.ico
// @author             Jason Kwok
// @namespace          https://jasonhk.dev/
// @version            1.0.0
// @license            MIT
// @match              https://www.esjzone.cc/
// @match              https://www.esjzone.cc/update
// @match              https://www.esjzone.cc/update/
// @match              https://www.esjzone.cc/list-*
// @match              https://www.esjzone.cc/tags/*
// @match              https://www.esjzone.cc/tags-*
// @run-at             document-idle
// @grant              GM_addStyle
// @supportURL         https://greasyfork.org/scripts/471774/feedback
// ==/UserScript==

GM_addStyle(`
    .card.nsfw .product-badge
    {
        z-index: 1;
    }

    .card.nsfw .main-img > div
    {
        filter: blur(7.5px);
        transition: 0.3s;
    }

    .card.nsfw:hover .main-img > div, .card.nsfw:active .main-img > div
    {
        filter: blur(0px);
    }
`);

const badges = document.querySelectorAll(".card .product-badge");
for (const badge of badges)
{
    badge.parentElement.classList.add("nsfw");
}