SankakuHairyBalls

Removes censorship from the balls of Gundam figmas.

Stan na 28-09-2019. Zobacz najnowsza wersja.

Aby zainstalować ten skrypt, wymagana jest instalacje jednego z następujących rozszerzeń: Tampermonkey, Greasemonkey lub Violentmonkey.

Aby zainstalować ten skrypt, wymagana jest instalacje jednego z następujących rozszerzeń: Tampermonkey, Violentmonkey.

Aby zainstalować ten skrypt, wymagana jest instalacje jednego z następujących rozszerzeń: Tampermonkey, Violentmonkey.

Aby zainstalować ten skrypt, wymagana będzie instalacja rozszerzenia Tampermonkey lub Userscripts.

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

Aby zainstalować ten skrypt, musisz zainstalować rozszerzenie menedżera skryptów użytkownika.

(Mam już menedżera skryptów użytkownika, pozwól mi to zainstalować!)

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.

Będziesz musiał zainstalować rozszerzenie menedżera stylów użytkownika, aby zainstalować ten styl.

Będziesz musiał zainstalować rozszerzenie menedżera stylów użytkownika, aby zainstalować ten styl.

Musisz zainstalować rozszerzenie menedżera stylów użytkownika, aby zainstalować ten styl.

(Mam już menedżera stylów użytkownika, pozwól mi to zainstalować!)

// ==UserScript==
// @name SankakuHairyBalls
// @description Removes censorship from the balls of Gundam figmas.
// @version 2
// @namespace Violentmonkey Scripts
// @match https://www.sankakucomplex.com/*
// @grant none
// ==/UserScript==

var CENSOR_CLASS = "censored";
var CENSOR_URL = "?then=";

function runScript()
{
    // Removes the censor class from the images
    var x = document.getElementsByClassName(CENSOR_CLASS);
    for (var i = x.length-1; i >= 0; i--) {
        x[i].classList.remove(CENSOR_CLASS);
    }

    // Removes the disclaimer page from the links
    // example: https://www.sankakucomplex.com/mature-content-disclaimer/?then=
    var xx = document.getElementsByTagName("A");
    for (var i = 0; i < xx.length; i++) {    
        var href = xx[i].href;
        var j = href.indexOf(CENSOR_URL);
        if (j >= 0) {
            var link = href.substring(j + CENSOR_URL.length);
            link = decodeURIComponent(link); 
            //console.log(link);
            xx[i].href = link;

            // Click 'Yes' if we're in the disclaimer page
            var html = xx[i].innerHTML;
            if (html == "Yes, show me everything") {
                window.location.href = link;
                // alt
                //var evt = document.createEvent("HTMLEvents");
                //evt.initEvent("click", true, true);
                //xx[i].dispatchEvent(evt);
            }
        }
    }
}

document.addEventListener('DOMNodeInserted', runScript, false);