FMH

更改腐漫画图片地址

This script has been deleted.

// ==UserScript==
// @name         FMH
// @namespace    FMH-Script
// @version      2019.07.13
// @description  更改腐漫画图片地址
// @author       FuMan
// @match        m.fmhuaa.net/manhua/*
// @grant        none
// @run-at       document-start
// @icon         http://m.fmhuaa.net/favicon.ico
// @require      https://code.jquery.com/jquery-3.3.1.min.js
// ==/UserScript==

(function() {
    'use strict';
    var url = 'https://www.fuman.tk/fmh/?url=';
    var url_ = 'https://www.fuman.tk/fmh/?not-return=1&url=';

    Object.defineProperty( window , 'nofind' , {
        writable : false ,
        configurable : false ,
        value : function (){
            document.getElementById("bigpic").setAttribute('onerror','');
            document.getElementById("bigpic").src = url + window.imgurl;
            document.getElementById("nextpic").src = url + window.imgurl;
        }
    })
    Object.preventExtensions( window.nofind );
    Object.seal( window.nofind );
    Object.freeze( window.nofind );
    document.addEventListener('DOMSubtreeModified',function(){
        if ( document.querySelector('img[src="/images/nofind.gif"]') ) {
            document.querySelector('img[src="/images/nofind.gif"]').src = 'http://m.fmhuaa.net/images/pic_loading.gif';
            document.querySelector('img[name="bigpic"]').src = url + window.imgurl;
        }
    },false);

    $('a[href*="appbl.html"]').on('click',function(){return false;})
    $('div[id*="xPk"]').on('click',function(){$('div[id*="xPk"]').remove();return false;})

    $(function(){
        if ( window.location.href.search( /m.fmhuaa.net\/manhua\/(.*?)\/(.*?).html/ ) != -1 ) {


            var img = document.createElement("img");
            img.setAttribute ( 'style' , 'width: 0;height: 0;' );
            img.setAttribute ( 'src' , url_ + window.imgurl );
            document.querySelector('body').appendChild(img);

            document.addEventListener('DOMSubtreeModified',function(){
                if (document.querySelector('a[href*="appbl.html"]') != undefined ){
                    try{
                        document.querySelector('a[href*="appbl.html"]').remove();
                    }
                    catch(e){
                        ;
                    }
                }
                if (document.querySelectorAll('div[id*="xPk"]') != undefined ) {
                    try{
                        document.querySelectorAll('div[id*="xPk"]').parentNode.removeChild(document.querySelector('div[id*="xPk"]'));
                    }
                    catch (e) {;}
                }
                if ( document.querySelector('img[onclick*=".Cl();"]') != undefined ) {
                    try {
                        document.querySelector('img[onclick*=".Cl();"]').parentNode.parentNode.parentNode.remove();
                    }
                    catch ( e ) {;}
                }
            },false);
        }

    })
})();