Greasy Fork is available in English.

KissAnime Anti-Adblock Blocker

Not even the people from Easylist seem to fight this site anymore, someone had to try as this looks popular enough. *sigh*

As of 07/09/2014. See the latest version.

// ==UserScript==
// @name        KissAnime Anti-Adblock Blocker
// @namespace   userscripts.org/user/swyter
// @description Not even the people from Easylist seem to fight this site anymore, someone had to try as this looks popular enough. *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;}";