delete anti-adblock sankaku complex

fuck you sankaku, fuck you WinterXIX

As of 2023-09-23. See the latest version.

// ==UserScript==
// @name         delete anti-adblock sankaku complex
// @namespace    http://tampermonkey.net/
// @version      0.1.4
// @description  fuck you sankaku, fuck you WinterXIX
// @author       shadyreptilian
// @match        https://chan.sankakucomplex.com/*
// @grant        none
// @run-at document-idle
// @license MIT
// ==/UserScript==


var divs = document.getElementsByTagName("div");
var todelete = []
for(var i = 0; i < divs.length; i++){
    if(divs[i].id == "content" && divs[i].parentElement.nodeName == 'BODY'){
        var child_nodes = divs[i].childNodes
        for(var n = 0; n < child_nodes.length; n++){
            if(child_nodes[n].localName == "div"){
                var outer_text = String(child_nodes[n].outerText).replace(/\s/g, "").replace(/[\u200B-\u200D\uFEFF]/g, '')
                var isAntiAdblock = outer_text.indexOf("ad-block")
                if(isAntiAdblock >= 0){
                    todelete.push(child_nodes[n])
                }
            }
        }
    }
}


for(var j = 0; j < todelete.length; j++){
    todelete[j].remove();
}