ajax_comment_form_imgbb

catwar script!

La data de 16-01-2023. Vezi ultima versiune.

// ==UserScript==
// @name ajax_comment_form_imgbb
// @namespace http://tampermonkey.net/
// @version 0.1.6
// @author Nei & Bab
// @description catwar script!
// @match https://catwar.su/*
// @license MIT
// ==/UserScript==

(function() {

    var script = document.createElement('script');
    script.type = 'text/javascript';
    script.src = 'https://imgbb.com/upload.js';
    script.dataset.autoInsert = "bbcode-embed-medium";

    $('#main').bind("DOMSubtreeModified",function(){
        if(document.querySelector('#text')){
            script.dataset.sibling = "#text";
            document.head.appendChild(script);
        }
    });

    $('#creation_div').bind("DOMSubtreeModified",function(){
        if(document.querySelector('#creation-text')){
            script.dataset.sibling = "#creation-text";
            document.head.appendChild(script);
        }
    });
    if(document.querySelector('#mess_form')){
        script.dataset.sibling = "#mess_form";
        document.head.appendChild(script);
    }

    window.onload = function() {
        if(document.querySelector('#send_comment_form')){
            script.dataset.sibling = "#comment";
            document.head.appendChild(script);
        }
    };


    if(document.querySelectorAll(".imgbb-container").length > 1){
        document.querySelector(".imgbb-container").remove()
    }

})();