PageSourceSearch

https://www.milkitapp.com/sites/themes/industrial/js/custom/core.messages.min.js

js milkitapp.com collected 2026-10-02 16:03:18 UTC 5,032 bytes, 126 lines download raw bytes

1function ancora_init_messages(){
2    ANCORA_GLOBALS.message_callback = null;
3    ANCORA_GLOBALS.message_timeout = 5000;
4    jQuery("body").on("click", "#ancora_modal_bg,.ancora_message .ancora_message_close", function (a) {
5        ancora_message_destroy();
6        if (ANCORA_GLOBALS.message_callback) {
7            ANCORA_GLOBALS.message_callback(0);
8            ANCORA_GLOBALS.message_callback = null
9        }
10        a.preventDefault();
11        return false
12    })
13}
14function ancora_message_warning(c) {
15    var d = arguments[1] ? arguments[1] : "";
16    var b = arguments[2] ? arguments[2] : "cancel-1";
17    var a = arguments[3] ? arguments[3] : ANCORA_GLOBALS.message_timeout;
18    return ancora_message({msg: c, hdr: d, icon: b, type: "warning", delay: a, buttons: [], callback: null})
19}
20function ancora_message_success(c) {
21    var d = arguments[1] ? arguments[1] : "";
22    var b = arguments[2] ? arguments[2] : "check-1";
23    var a = arguments[3] ? arguments[3] : ANCORA_GLOBALS.message_timeout;
24    return ancora_message({msg: c, hdr: d, icon: b, type: "success", delay: a, buttons: [], callback: null})
25}
26function ancora_message_info(c) {
27    var d = arguments[1] ? arguments[1] : "";
28    var b = arguments[2] ? arguments[2] : "info-1";
29    var a = arguments[3] ? arguments[3] : ANCORA_GLOBALS.message_timeout;
30    return ancora_message({msg: c, hdr: d, icon: b, type: "info", delay: a, buttons: [], callback: null})
31}
32function ancora_message_regular(c) {
33    var d = arguments[1] ? arguments[1] : "";
34    var b = arguments[2] ? arguments[2] : "quote-1";
35    var a = arguments[3] ? arguments[3] : ANCORA_GLOBALS.message_timeout;
36    return ancora_message({msg: c, hdr: d, icon: b, type: "regular", delay: a, buttons: [], callback: null})
37}
38function ancora_message_confirm(a) {
39    var c = arguments[1] ? arguments[1] : "";
40    var b = arguments[2] ? arguments[2] : null;
41    return ancora_message({
42        msg: a,
43        hdr: c,
44        icon: "help-1",
45        type: "regular",
46        delay: 0,
47        buttons: ["Yes", "No"],
48        callback: b
49    })
50}
51function ancora_message_dialog(a) {
52    var d = arguments[1] ? arguments[1] : "";
53    var b = arguments[2] ? arguments[2] : null;
54    var c = arguments[3] ? arguments[3] : null;
55    return ancora_message({
56        msg: a,
57        hdr: d,
58        icon: "",
59        type: "regular",
60        delay: 0,
61        buttons: ["Apply", "Cancel"],
62        init: b,
63        callback: c
64    })
65}
66function ancora_message(b) {
67    var c = b.msg != undefined ? b.msg : "";
68    var l = b.hdr != undefined ? b.hdr : "";
69    var k = b.icon != undefined ? b.icon : "";
70    var h = b.type != undefined ? b.type : "regular";
71    var e = b.delay != undefined ? b.delay : ANCORA_GLOBALS.message_timeout;
72    var g = b.buttons != undefined ? b.buttons : [];
73    var n = b.init != undefined ? b.init : null;
74    var m = b.callback != undefined ? b.callback : null;
75    jQuery("#ancora_modal_bg").remove();
76    jQuery("body").append('<div id="ancora_modal_bg"></div>');
77    jQuery("#ancora_modal_bg").fadeIn();
78    jQuery(".ancora_message").remove();
79    var f = '<div class="ancora_message ancora_message_' + h + (g.length > 0 ? " ancora_message_dialog" : "") + '"><span class="ancora_message_close iconadmin-cancel icon-cancel-1"></span>' + (k ? '<span class="ancora_message_icon iconadmin-' + k + " icon-" + k + '"></span>' : "") + (l ? '<h2 class="ancora_message_header">' + l + "</h2>" : "");
80    f += '<div class="ancora_message_body">' + c + "</div>";
81    if (g.length > 0) {
82        f += '<div class="ancora_message_buttons">';
83        for (var d = 0; d < g.length; d++) {
84            f += '<span class="ancora_message_button">' + g[d] + "</span>"
85        }
86        f += "</div>"
87    }
88    f += "</div>";
89    jQuery("body").append(f);
90    var a = jQuery("body .ancora_message").eq(0);
91    if (m != null) {
92        ANCORA_GLOBALS.message_callback = m;
93        jQuery(".ancora_message_button").click(function (o) {
94            var i = jQuery(this).index();
95            m(i + 1, a);
96            ANCORA_GLOBALS.message_callback = null;
97            ancora_message_destroy()
98        })
99    }
100    if (n != null) {
101        n(a)
102    }
103    var j = jQuery(window).scrollTop();
104    jQuery("body .ancora_message").animate({
105        top: j + Math.round((jQuery(window).height() - jQuery(".ancora_message").height()) / 2),
106        opacity: 1
107    }, {
108        complete: function () {
109        }
110    });
111    if (e > 0) {
112        setTimeout(function () {
113            ancora_message_destroy()
114        }, e)
115    }
116    return a
117}
118function ancora_message_destroy() {
119    var a = jQuery(window).scrollTop();
120    jQuery("#ancora_modal_bg").fadeOut();
121    jQuery(".ancora_message").animate({top: a - jQuery(".ancora_message").height(), opacity: 0});
122    setTimeout(function () {
123        jQuery("#ancora_modal_bg").remove();
124        jQuery(".ancora_message").remove()
125    }, 500)
126};

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.