Bypass Stencil Sticker's Size Limit

same as in the name of the script

目前為 2022-06-18 提交的版本,檢視 最新版本

// ==UserScript==
// @name         Bypass Stencil Sticker's Size Limit
// @namespace    http://tampermonkey.net/
// @version      1.0
// @description  same as in the name of the script
// @author       Vholran
// @match        https://*.drawaria.online/*
// @require      https://cdnjs.cloudflare.com/ajax/libs/jquery/3.6.0/jquery.min.js
// @icon         https://www.google.com/s2/favicons?domain=drawaria.online
// @grant        none
// ==/UserScript==

(function ($, undefined) {
    $(function () {
        let roomWords = new RegExp('\Шаблоны|Plantillas|Stencils');
        let joinRoomObserver = new MutationObserver(function(mutations) {
            if(roomWords.test(mutations[0].target.textContent)&&LOGGEDIN){
                let launchStickerObserver = new MutationObserver(function(mutations) {
                    if (mutations[0].target.disabled) {
                        $('.fa-parachute-box').parent().prop('disabled',false);
                    }
                });
                launchStickerObserver.observe($('.fa-parachute-box').parent()[0], {attributes: true});
            }
            joinRoomObserver.disconnect();
        });
        joinRoomObserver.observe($('#infotext')[0], {childList: true });
    });
})(window.jQuery.noConflict(true));