Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // ==UserScript==
- // @name mAlert unlocker 2 (SI)
- // @namespace http://http://czogi.usermd.net
- // @version 0.1
- // @description odblokowywuje poruszanie się podczas mAlertu
- // @author Czogi
- // @match http://*.margonem.pl/
- // @grant none
- // ==/UserScript==
- if (getCookie("interface") !== "ni")
- g.loadQueue.push({
- fun() {
- window.mAlert = function(t, e, a, n) {
- if ($("#alert").hide(),
- $("#alert .a2").remove(),
- $("#alert .a1").after($("<div>").addClass("a2")),
- $("#alert .a2").html(t),
- isset(e) || (e = 0),
- $("#alert").attr("class", "").addClass("mode" + e + (isset(n) ? " hmode_" + n : "")),
- 3 == e && $("#alert .a2").append('<div class="mAlertInputContainer"><div class="bLeft"></div><input maxlength="25" name="mAlertInput" /><div class="bRight"></div></div>'),
- $("#a_ok").toggleClass("bal_yes", 2 == e).toggleClass("bal_ok", 2 != e).show(),
- $("#a_cancel").toggleClass("bal_no", 2 == e).toggleClass("bal_cancel", 2 != e).show(),
- 1 == e || 2 == e || 3 == e || 4 == e)
- $("#a_ok").unbind("click").click((function() {
- $("#a_ok").unbind("click"),
- $("#alert").fadeOut(300),
- $("#a_ok").blur()
- }
- )),
- $("#a_cancel").unbind("click").click((function() {
- $("#a_cancel").unbind("click"),
- $("#alert").fadeOut(300),
- $("#a_ok").blur()
- }
- )),
- isset(a) && (a.length >= 1 && "function" == typeof a[0] && $("#a_ok").click(a[0]),
- a.length >= 2 && "function" == typeof a[1] && $("#a_cancel").click(a[1]));
- else {
- var l = "#a_ok"
- , i = "#a_cancel";
- 5 == e && (l = "#a_cancel",
- i = "#a_ok"),
- $(i).hide(),
- $(l).unbind("click").click((function() {
- $(l).unbind("click"),
- $("#alert").fadeOut(300),
- $(l).blur()
- }
- )),
- isset(a) && a && $(l).click(a)
- }
- $("#alert").absCenter().fadeIn("fast", (function() {
- $('#alert input[name="mAlertInput"]').focus()
- }
- ))
- $("#alert").css("display","grid")
- }}
- })
Add Comment
Please, Sign In to add comment