漫画台web免费破解插件

漫画台脚本

目前為 2020-10-08 提交的版本,檢視 最新版本

// ==UserScript==
// @name         漫画台web免费破解插件
// @namespace    9c
// @version      1.2
// @description  漫画台脚本
// @author       9c
// @match        https://www.manhuatai.com/*
// @match        https://manhuatai.com/*
// @match        https://m.manhuatai.com/*
// @match        http://www.manhuatai.com/*
// @match        http://manhuatai.com/*
// @match        http://m.manhuatai.com/*
// @require      https://cdn.bootcdn.net/ajax/libs/jquery/1.10.0/jquery.min.js
// ==/UserScript==

(function() {
    'use strict';
    setInterval(function(){
        $(".read-footer-pannel .left").remove()
        $("#js_swichH").remove()
        $("#js_ftAutoBtn").remove()
        $(".layui-layer").remove()
        $("#layui-layer-shade1").remove()
        $("#js_payChapter").remove()
        $("#js_content").css("margin-top", "0")
    }, 20);

    var $ = window.$

    unsafeWindow.onload = function () {
        var comic_info = unsafeWindow.comicInfo;
        $("#readerContainer").css("height", "auto")
        $(".read-footer-pannel .inner .right").css("width","50%")

        $(".acgn-reader-chapter__item.no-chapter acgn-chapter__interact ").css("width", "100%")

        $("acgn-reader-chapter__item.no-chapter.acgn-chapter__interact").css("margin", "auto")
        $(".acgn-reader-chapter__item-box").each(function(){
            let chapter_id = $(this).attr("chapter-id")
            if (unsafeWindow.comicInfo.current_chapter.chapter_newid == chapter_id) {

                $(this).find(".acgn-reader-chapter__item.loading").each(function(){
                    $(this).css("padding-bottom", "0px")
                    $(this).height("auto")
                    let index = $(this).attr("chapter-index");
                    var img_url = '//mhpic.' + unsafeWindow.comicInfo.current_chapter.chapter_domain + unsafeWindow.comicInfo.current_chapter.rule.replace('$$', index) + '-mht.low'
                    var html = '<div class="acgn-reader-chapter__swiper-box" style="width:100%" chapter-index="'+index+'" chapter-pid="3009">'+index+'<img src="'+img_url+'" style="width:100%"></div>'
                    if ($(document.body).width() >= 500) {
                        html = '<div class="acgn-reader-chapter__swiper-box" style="width:800px" chapter-index="'+index+'" chapter-pid="3009">'+index+'<img src="'+img_url+'" width="800"></div>'
                    }
                    $(this).html(html)
                })

            } else {
                $(this).remove()
            }
        })
        $("#js_pageNextBtn").on("click", function() {
            location.href = "https://www.manhuatai.com/"+unsafeWindow.comicInfo.comic_newid+"/"+unsafeWindow.comicInfo.next_chapter.chapter_newid+".html"
        })
        $("#js_pagePrevBtn").on("click", function() {
            location.href = "https://www.manhuatai.com/"+unsafeWindow.comicInfo.comic_newid+"/"+unsafeWindow.comicInfo.prev_chapter.chapter_newid+".html"
        })
    }
})();