漫画台PC浏览

在PC上看漫画

您需要先安裝使用者腳本管理器擴展,如 TampermonkeyGreasemonkeyViolentmonkey 之後才能安裝該腳本。

您需要先安裝使用者腳本管理器擴充功能,如 TampermonkeyViolentmonkey 後才能安裝該腳本。

您需要先安裝使用者腳本管理器擴充功能,如 TampermonkeyViolentmonkey 後才能安裝該腳本。

您需要先安裝使用者腳本管理器擴充功能,如 TampermonkeyUserscripts 後才能安裝該腳本。

你需要先安裝一款使用者腳本管理器擴展,比如 Tampermonkey,才能安裝此腳本

您需要先安裝使用者腳本管理器擴充功能後才能安裝該腳本。

(我已經安裝了使用者腳本管理器,讓我安裝!)

你需要先安裝一款使用者樣式管理器擴展,比如 Stylus,才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展,比如 Stylus,才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展,比如 Stylus,才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展後才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展後才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展後才能安裝此樣式

(我已經安裝了使用者樣式管理器,讓我安裝!)

// ==UserScript==
// @name         漫画台PC浏览
// @namespace    http://idrunk.net/
// @version      1.0
// @description  在PC上看漫画
// @author       Drunk
// @match        http://*.manhuatai.com/*
// ==/UserScript==
// @require      http://code.jquery.com/jquery-1.11.0.min.js


(() => {
    'use strict';

    let scheme = {
        timer (callback, time) {
            if (this.stoped) return;
            if (!time) time = 100;
            window.setTimeout(() => {
                callback.call();
                scheme.timer.call(this, callback, time);
            }, time);
        },

        stop () {
           this.stoped = 1;
        }
    };

    $(() => {
        $('body').prepend('<style>#mh_member{display:none;}</style>'); // 关闭遮罩
        scheme.timer(() => {
            let layer = $('#mh_member');
            if (layer.length) {
                layer.remove(); // 移除遮罩
                $('body').css('overflow', 'auto'); // 开启滚动
                $(document).off("contextmenu"); // 开启右键
                scheme.stop(); // 停止任务
            }
        }, 10);
    });
})();