Not even the people from Easylist seem to fight this site anymore. *sigh*
当前为
// ==UserScript==
// @name KissAnime Anti-Adblock Blocker
// @namespace userscripts.org/user/swyter
// @description Not even the people from Easylist seem to fight this site anymore. *sigh*
// @match http://kissanime.com/*
// @version 2
// @grant none
// @run-at document-end
// ==/UserScript==
/* run this just on the parent page, not in sub-frames */
if (window.parent !== window)
throw "stop execution";
/* get rid of timeouts right away, they aren't used for anything useful */
console.log("Started KissAnime Anti-Adblock Blocker, waiting for the DOM to load...");
window.setTimeout=undefined;
function when_external_loaded()
{
console.log("DOM loaded, processing stuff...");
window.setTimeout=undefined;
/* remove the anti-adblock script */
if(thing=document.querySelector("#adCheck3 + script"))
{
thing.parentElement.removeChild(thing);
}
/* get rid of the cruft */
for(elem in cruft=document.querySelectorAll("iframe[src*='ad'], .divCloseBut, .clear2, div[style*='!important']"))
{
if(typeof cruft[elem]==="object")
{
console.log("removing cruft: ", cruft[elem]);
cruft[elem].parentElement.removeChild(cruft[elem]);
}
}
}
/* inject this cleaning function right in the page */
window.document.head.appendChild(
inject_fn = document.createElement("script")
);
inject_fn.innerHTML = when_external_loaded.toString() + ";when_external_loaded()";
/* fix upper links positioning after removing the cruft */
window.document.head.appendChild(
inject_st = document.createElement("style")
);
inject_st.innerHTML = "a#qualityChoose{display:block;}";