toggle

Toggles chapter's read state

2019/07/09のページです。最新版はこちら

スクリプトをインストールするには、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         toggle
// @namespace    http://tampermonkey.net/
// @version      0.1
// @description  Toggles chapter's read state
// @author       Iuga Stefan
// @match        https://mangadex.org/title/*
// @grant        none
// ==/UserScript==

(function() {
    'use strict';
    let but = document.createElement("div");
    let sp = document.createElement("span");
    sp.className="fas fa-eye fa-fw";
    but.appendChild(sp);
    var t = document.createTextNode(" Mark all chapters read/unread");
    but.appendChild(t);
    but.style.cursor="pointer";
    but.onclick=()=>{
        let x = document.getElementsByClassName("chapter_mark_read_button");
        if(x.length!==0){
            Array.from(x).forEach(item=>item.click());
        }else {
            x = document.getElementsByClassName("chapter_mark_unread_button");
            if(x.length!==0){
                Array.from(x).forEach(item=>item.click());
            }
            else{
                console.log("nothing to click");
            }
        }
    }

    document.getElementById("navbarSupportedContent").appendChild(but);
})();