delete anti-adblock sankaku complex

fuck you sankaku, fuck you WinterXIX

You will need to install an extension such as Tampermonkey, Greasemonkey or Violentmonkey to install this script.

You will need to install an extension such as Tampermonkey or Violentmonkey to install this script.

You will need to install an extension such as Tampermonkey or Violentmonkey to install this script.

You will need to install an extension such as Tampermonkey or Userscripts to install this script.

You will need to install an extension such as Tampermonkey to install this script.

You will need to install a user script manager extension to install this script.

(I already have a user script manager, let me install it!)

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

You will need to install a user style manager extension to install this style.

You will need to install a user style manager extension to install this style.

You will need to install a user style manager extension to install this style.

(I already have a user style manager, let me install it!)

// ==UserScript==
// @name         delete anti-adblock sankaku complex
// @namespace    http://tampermonkey.net/
// @version      0.1.5
// @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 = []
var div = document.getElementById("content")
var clone = div.cloneNode(true);
clone.id = "asdf";


var clonechild_nodes = clone.childNodes
for(var c = 0; c < clonechild_nodes.length; c++){
    if(clonechild_nodes[c].localName == "div"){
        var cloneouter_text = String(clonechild_nodes[c].outerText).replace(/\s/g, "").replace(/[\u200B-\u200D\uFEFF]/g, '')
        var isAntiAdblock = cloneouter_text.indexOf("ad-block")
        if(isAntiAdblock >= 0){
            todelete.push(clonechild_nodes[c])
        }
    }
}


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


div.remove();
clone.id = "content";
div = clone
document.body.appendChild(clone);