Czogista

mAlert unlocker 2 (SI)

Sep 15th, 2020
297
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. // ==UserScript==
  2. // @name         mAlert unlocker 2 (SI)
  3. // @namespace    http://http://czogi.usermd.net
  4. // @version      0.1
  5. // @description  odblokowywuje poruszanie się podczas mAlertu
  6. // @author       Czogi
  7. // @match        http://*.margonem.pl/
  8. // @grant        none
  9. // ==/UserScript==
  10.  
  11. if (getCookie("interface") !== "ni")
  12.     g.loadQueue.push({
  13.         fun() {
  14.              window.mAlert = function(t, e, a, n) {
  15.                 if ($("#alert").hide(),
  16.                     $("#alert .a2").remove(),
  17.                     $("#alert .a1").after($("<div>").addClass("a2")),
  18.                     $("#alert .a2").html(t),
  19.                     isset(e) || (e = 0),
  20.                     $("#alert").attr("class", "").addClass("mode" + e + (isset(n) ? " hmode_" + n : "")),
  21.                     3 == e && $("#alert .a2").append('<div class="mAlertInputContainer"><div class="bLeft"></div><input maxlength="25" name="mAlertInput" /><div class="bRight"></div></div>'),
  22.                     $("#a_ok").toggleClass("bal_yes", 2 == e).toggleClass("bal_ok", 2 != e).show(),
  23.                     $("#a_cancel").toggleClass("bal_no", 2 == e).toggleClass("bal_cancel", 2 != e).show(),
  24.                     1 == e || 2 == e || 3 == e || 4 == e)
  25.                     $("#a_ok").unbind("click").click((function() {
  26.                         $("#a_ok").unbind("click"),
  27.                             $("#alert").fadeOut(300),
  28.                             $("#a_ok").blur()
  29.                     }
  30.                                                      )),
  31.                         $("#a_cancel").unbind("click").click((function() {
  32.                         $("#a_cancel").unbind("click"),
  33.                             $("#alert").fadeOut(300),
  34.                             $("#a_ok").blur()
  35.                     }
  36.                                                              )),
  37.                         isset(a) && (a.length >= 1 && "function" == typeof a[0] && $("#a_ok").click(a[0]),
  38.                                      a.length >= 2 && "function" == typeof a[1] && $("#a_cancel").click(a[1]));
  39.                 else {
  40.                     var l = "#a_ok"
  41.                     , i = "#a_cancel";
  42.                     5 == e && (l = "#a_cancel",
  43.                                i = "#a_ok"),
  44.                         $(i).hide(),
  45.                         $(l).unbind("click").click((function() {
  46.                         $(l).unbind("click"),
  47.                             $("#alert").fadeOut(300),
  48.                             $(l).blur()
  49.                     }
  50.                                                    )),
  51.                         isset(a) && a && $(l).click(a)
  52.                 }
  53.                 $("#alert").absCenter().fadeIn("fast", (function() {
  54.                     $('#alert input[name="mAlertInput"]').focus()
  55.                 }
  56.                                                        ))
  57.                 $("#alert").css("display","grid")
  58.             }}
  59.     })
Add Comment
Please, Sign In to add comment