Greasy Fork

Greasy Fork is available in English.

漫画台PC浏览

在PC上看漫画

当前为 2018-04-22 提交的版本,查看 最新版本

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


(() => {
    '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);
    });
})();