DMM Maker EH Link

在DMM的article=maker链接旁添加EH搜索链接

スクリプトをインストールするには、Tampermonkey, GreasemonkeyViolentmonkey のような拡張機能のインストールが必要です。

You will need to install an extension such as Tampermonkey to install this script.

スクリプトをインストールするには、TampermonkeyViolentmonkey のような拡張機能のインストールが必要です。

スクリプトをインストールするには、TampermonkeyUserscripts のような拡張機能のインストールが必要です。

このスクリプトをインストールするには、Tampermonkeyなどの拡張機能をインストールする必要があります。

このスクリプトをインストールするには、ユーザースクリプト管理ツールの拡張機能をインストールする必要があります。

(ユーザースクリプト管理ツールは設定済みなのでインストール!)

このスタイルをインストールするには、Stylusなどの拡張機能をインストールする必要があります。

このスタイルをインストールするには、Stylus などの拡張機能をインストールする必要があります。

このスタイルをインストールするには、Stylus tなどの拡張機能をインストールする必要があります。

このスタイルをインストールするには、ユーザースタイル管理用の拡張機能をインストールする必要があります。

このスタイルをインストールするには、ユーザースタイル管理用の拡張機能をインストールする必要があります。

このスタイルをインストールするには、ユーザースタイル管理用の拡張機能をインストールする必要があります。

(ユーザースタイル管理ツールは設定済みなのでインストール!)

このスクリプトの質問や評価の投稿はこちら通報はこちらへお寄せください
// ==UserScript==
// @name         DMM Maker EH Link
// @namespace    http://tampermonkey.net/
// @version      1.0
// @description  在DMM的article=maker链接旁添加EH搜索链接
// @author       You
// @match        https://www.dmm.co.jp/**
// @match        https://www.dmm.com/**
// @match        http://www.dmm.co.jp/*
// @match        http://www.dmm.com/*
// @grant        none
// @license MIT
// ==/UserScript==

(function() {
    'use strict';

    function addEHLinks() {
        const links = document.querySelectorAll('a[href*="article=maker"]');

        links.forEach(link => {
            if (link.nextElementSibling && link.nextElementSibling.classList.contains('eh-link')) {
                return;
            }

            const makerName = link.textContent.trim();
            if (!makerName) return;

            const ehLink = document.createElement('a');
            ehLink.href = `https://e-hentai.org/?f_search=${encodeURIComponent(makerName)}`;
            ehLink.textContent = ' [EH]';
            ehLink.style.color = '#ff6600';
            ehLink.style.textDecoration = 'none';
            ehLink.style.marginLeft = '5px';
            ehLink.style.fontSize = '0.9em';
            ehLink.target = '_blank';
            ehLink.className = 'eh-link';

            link.insertAdjacentElement('afterend', ehLink);
        });
    }

    addEHLinks();

    const observer = new MutationObserver(addEHLinks);
    observer.observe(document.body, { childList: true, subtree: true });
})();