kita

try to take over the world!

// ==UserScript==
// @name         kita
// @namespace    http://tampermonkey.net/
// @version      0.1
// @description  try to take over the world!
// @author       ECH
// @match        *://boards.4chan.org/*
// @grant        none
// ==/UserScript==

(function() {
    document.addEventListener('QRDialogCreation', function(e) {
        var textbox = document.getElementById("qr").getElementsByTagName("TEXTAREA")[0];
        setTimeout( function(){textbox.value += "キタ━━━(゚∀゚)━━━!!\n";}, 50);

        function kita(){
            var links = document.getElementsByTagName("A");
            var len = links.length;
            for(var i = len - 1 ; i >= 0 ; i--){
                if (links[i].getAttribute("kita") === null && ((links[i].getAttribute("title") !== null && links[i].getAttribute("title").indexOf("Reply") !== -1) ||links[i].className === "qr-link" )) {
                    links[i].setAttribute("kita", "!!!");
                    links[i].addEventListener("click", function(e){
                        var textbox = document.getElementById("qr").getElementsByTagName("TEXTAREA")[0];
                        setTimeout( function(){textbox.value += "キタ━━━(゚∀゚)━━━!!\n";}, 50);
                    });
                }
            }
            if(document.getElementById("togglePostFormLink").childNodes[1].getAttribute("kita") === null){
                document.getElementById("togglePostFormLink").childNodes[1].setAttribute("kita", "!!!");
                document.getElementById("togglePostFormLink").childNodes[1].addEventListener("click", function(){
                    var textbox = document.getElementById("postForm").getElementsByTagName("TEXTAREA")[0];
                    setTimeout( function(){textbox.value += "キタ━━━(゚∀゚)━━━!!\n";}, 50);
                });
            }
        }
        new MutationObserver(function(mutations){
            mutations.forEach(function(mutation){
                mutation.addedNodes.forEach(kita);
            });
        }).observe(document.body, {childList: true, subtree: true});

    }, false);

    function mainKita(){
        if(document.getElementById("togglePostFormLink").childNodes[1].getAttribute("kita") === null){
            document.getElementById("togglePostFormLink").childNodes[1].setAttribute("kita", "!!!");
            document.getElementById("togglePostFormLink").childNodes[1].addEventListener("click", function(){
                var textbox = document.getElementById("postForm").getElementsByTagName("TEXTAREA")[0];
                setTimeout( function(){textbox.value += "キタ━━━(゚∀゚)━━━!!\n";}, 50);
            });
        }
    }
            new MutationObserver(function(mutations){
            mutations.forEach(function(mutation){
                mutation.addedNodes.forEach(mainKita);
            });
        }).observe(document.body, {childList: true, subtree: true});

})();

QingJ © 2025

镜像随时可能失效,请加Q群300939539或关注我们的公众号极客氢云获取最新地址