Dynasty Stripper

Force long-strip on Dynasty Scans where applicable

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴Greasemonkey 油猴子Violentmonkey 暴力猴,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴Violentmonkey 暴力猴,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴Userscripts ,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展后才能安装此脚本。

(我已经安装了用户脚本管理器,让我安装!)

您需要先安装一款用户样式管理器扩展,比如 Stylus,才能安装此样式。

您需要先安装一款用户样式管理器扩展,比如 Stylus,才能安装此样式。

您需要先安装一款用户样式管理器扩展,比如 Stylus,才能安装此样式。

您需要先安装一款用户样式管理器扩展后才能安装此样式。

您需要先安装一款用户样式管理器扩展后才能安装此样式。

您需要先安装一款用户样式管理器扩展后才能安装此样式。

(我已经安装了用户样式管理器,让我安装!)

// ==UserScript==
// @name         Dynasty Stripper
// @namespace    http://chireiden.alwinfy.net/
// @version      2026-03-04
// @description  Force long-strip on Dynasty Scans where applicable
// @author       alwinfy
// @match        https://dynasty-scans.com/chapters/*
// @grant        none
// @license      MIT
// @run-at       document-body
// ==/UserScript==

(() => {
    'use strict';

    function makeLongStrip(pagesDiv) {
        if (!window.pages) return;
        const starterImg = pagesDiv.querySelector(":scope>img");

        window.pages.forEach((page) => {
            const newImg = document.createElement("img");
            Object.assign(newImg, {
                alt: page.name,
                src: page.image,
                width: page.width,
                height: page.height,
                className: page.width && page.height && page.height > 2 * page.width ? "tall" : "",
            });
            pagesDiv.appendChild(document.createElement("div")).appendChild(newImg);
        });
        window.pages.length = 1;

        pagesDiv.querySelectorAll(":scope>img, :scope>.pages-list>.page").forEach((node) => {
            node.parentNode.removeChild(node);
        });
    }

    document.querySelectorAll("#chapter-details>.tags>a.label")
        .forEach((node) => node.href.endsWith("/tags/long_strip") && makeLongStrip(document.querySelector("#image")));
})();