PageSourceSearch

https://www.myliftmaster.com/files/globalscript.js

js myliftmaster.com collected 2026-10-08 07:21:11 UTC 14,796 bytes, 382 lines download raw bytes

1
2function showNotifications(message, messageid, position) {
3    var n = noty({
4        layout: position,
5        theme: 'notificationMessageTheme',
6        type: 'alert',
7        template: '<div class="notificationMessage" id="' + messageid + '"><div class="noty_message"><span class="noty_text"></span><div class="noty_close"></div></div></div>',
8        text: message,
9        closeWith: ['button'],
10        callback: {
11            afterShow: function ($noty) {
12                var notyid = this.options.id;
13                $('#noty_close').on('click', function () {
14                    
15                    $.noty.close(notyid);
16                    $.cookie('shownotication_showschedulingnotication', "false", { expires: 40,secure  : true  });
17                    ga('send', 'event', $('#brand').val(), 'scheduling_Splash_Screen', "Close");
18                });
19            },
20            onCloseClick: function ($noty) {
21                var notyid = this.options.id;
22                var alertid = $("#" + notyid + " .notificationMessage").attr("id");
23                $noty.close();
24                $.cookie('shownotication_' + alertid, "false", { expires: 40, secure: true });
25            }
26        }
27    });
28
29
30}
31
32$(document).on("click", "#lightcopy", function (e) {
33    e.preventDefault();
34           
35    $.cookie('shownotication_showlightbanner', year + "-" + month + "-" + day, { expires: 40, secure: true });
36
37            window.open($("#BuyLightsURL").val(), '_blank');
38
39            ga('send', 'event', $('#brand').val(), 'light_Banner_Popup', "Goto store");
40            $.noty.closeAll();
41});
42
43
44$(document).on("click", "#OneDayBanner", function (e) {
45    e.preventDefault();
46
47    window.open($("#BuyLightsURL").val(), '_blank');
48
49    ga('send', 'event', $('#brand').val(), 'OneDay_light_Banner', "Goto store");
50});
51
52//$(document).on("click", "#schedcopy", function (e) {
53//    e.preventDefault();
54//    var currentslide = $(this).closest(".notificationMessage");
55
56//    var currentid = $(currentslide).attr("id");
57
58//    switch (currentid) {
59//        case "showschedulingnotication":
60//            $(currentslide).attr("id", "showschedulingnotication2");
61//            ga('send', 'event', $('#brand').val(), 'scheduling_Splash_Screen', "View screen 2");
62//            break;
63//        case "showschedulingnotication2":
64//            $(currentslide).attr("id", "showschedulingnotication3");
65//            ga('send', 'event', $('#brand').val(), 'scheduling_Splash_Screen', "View screen 3");
66//            break;
67//        case "showschedulingnotication3":
68//                $('html, body').animate({
69//                    scrollTop: $("#schedulecardpanel").offset().top
70//                }, 900);
71
72//                $(".js-addEvent").click();
73
74//                $.cookie('shownotication_showschedulingnotication', "false", { expires: 40, secure: true });
75
76//                ga('send', 'event', $('#brand').val(), 'scheduling_Splash_Screen', "Create Schedule");
77
78
79//                $("#OneDayBanner").show();
80
81//                var currentTime = new Date();
82//                var month = currentTime.getMonth() + 1;
83//                var day = currentTime.getDate() + 1;
84//                var year = currentTime.getFullYear();
85//            //console.log("Showbanner set: " + year + "-" + month + "-" + day)
86//                $.cookie('showonedaybanner', year + "-" + month + "-" + day, { expires: 40, secure: true });
87
88//                $.noty.closeAll();
89//                break;
90//        case "showschedulingnoticationlm":
91//            $(currentslide).attr("id", "showschedulingnotication2lm");
92//            ga('send', 'event', $('#brand').val(), 'scheduling_Splash_Screen', "View screen 2");
93//            break;
94//        case "showschedulingnotication2lm":
95//            $(currentslide).attr("id", "showschedulingnotication3lm");
96//            ga('send', 'event', $('#brand').val(), 'scheduling_Splash_Screen', "View screen 3");
97//            break;
98//        case "showschedulingnotication3lm":
99//            $('html, body').animate({
100//                scrollTop: $("#schedulecardpanel").offset().top
101//            }, 900);
102
103//            $(".js-addEvent").click();
104
105//            $.cookie('shownotication_showschedulingnotication', "false", { expires: 40, secure: true });
106
107//            ga('send', 'event', $('#brand').val(), 'scheduling_Splash_Screen', "Create Schedule");
108
109//            $.noty.closeAll();
110
111//            $("#OneDayBanner").show();
112
113//            var currentTime = new Date();
114//            var month = currentTime.getMonth() + 1;
115//            var day = currentTime.getDate() + 1;
116//            var year = currentTime.getFullYear();
117//            //console.log("Showbanner set: " + year + "-" + month + "-" + day)
118//            $.cookie('showonedaybanner', year + "-" + month + "-" + day, { expires: 40, secure: true });
119
120//            break;
121//        case "showschedulingnoticationmerlin":
122//            $(currentslide).attr("id", "showschedulingnoticationmerlin2");
123//            ga('send', 'event', $('#brand').val(), 'scheduling_Splash_Screen', "View screen 2");
124          
125
126//            break;
127//        case "showschedulingnoticationmerlin2":
128//           // $(currentslide).attr("id", "showschedulingnoticationmerlin2");
129
130//            $('html, body').animate({
131//                scrollTop: $("#schedulecardpanel").offset().top
132//            }, 900);
133
134//            $(".js-addEvent").click();
135
136//            $.cookie('shownotication_showschedulingnotication', "false", { expires: 40, secure: true });
137
138//            ga('send', 'event', $('#brand').val(), 'scheduling_Splash_Screen', "Create Schedule");
139
140//            $.noty.closeAll();
141
142           
143//            break;
144//        case "showschedulingnoticationcm":
145//            $(currentslide).attr("id", "showschedulingnoticationcm2");
146//            ga('send', 'event', $('#brand').val(), 'scheduling_Splash_Screen', "View screen 2");
147//            break;
148//        case "showschedulingnoticationcm2":
149//            $(currentslide).attr("id", "showschedulingnoticationcm3");
150//            ga('send', 'event', $('#brand').val(), 'scheduling_Splash_Screen', "View screen 2");
151//            break;
152//        case "showschedulingnoticationcm3":
153//            $(currentslide).attr("id", "showschedulingnoticationcm3");
154//            $('html, body').animate({
155//                scrollTop: $("#schedulecardpanel").offset().top
156//            }, 900);
157
158//            $(".js-addEvent").click();
159
160//            $.cookie('shownotication_showschedulingnotication', "false", { expires: 40, secure: true });
161
162//            ga('send', 'event', $('#brand').val(), 'scheduling_Splash_Screen', "Create Schedule");
163
164//            $.noty.closeAll();
165//            break;
166//    }
167
168//    //console.log(currentid);
169
170//});
171
172
173
174function showSchedNotifications(message, messageid, position) {
175    var n = noty({
176        layout: 'customBottomCenter',
177        theme: 'notificationMessageTheme',
178        type: 'alert',
179        template: '<div class="notificationMessage" id="' + messageid + '"><div class="noty_message"><span class="noty_text"></span><div id="notyCloseButton">X</div></div></div>',
180        text: message,
181        closeWith: ['button'],
182        callback: {
183            afterShow: function ($noty) {
184                var notyid = this.options.id;
185                $('#notyCloseButton').on('click', function() {
186                    
187                    $.noty.close(notyid);
188                    $.cookie('shownotication_showschedulingnotication', "false", { expires: 40, secure: true });
189                    ga('send', 'event', $('#brand').val(), 'scheduling_Splash_Screen', "Close");
190                    $("#OneDayBanner").show();
191
192                    var currentTime = new Date();
193                    var month = currentTime.getMonth() + 1;
194                    var day = currentTime.getDate() + 1;
195                    var year = currentTime.getFullYear();
196                    //console.log("Showbanner set: " + year + "-" + month + "-" + day)
197                    $.cookie('showonedaybanner', year + "-" + month + "-" + day, { expires: 40, secure: true });
198                });
199            },
200            onCloseClick: function ($noty) {
201                var notyid = this.options.id;
202                var alertid = $("#" + notyid + " .notificationMessage").attr("id");
203               
204                $noty.close();
205               
206                $.cookie('shownotication_' + alertid, "false", { expires: 40, secure: true });
207
208                ga('send', 'event', $('#brand').val(), 'scheduling_Splash_Screen', "Close");
209
210                $("#OneDayBanner").show();
211
212                var currentTime = new Date();
213                var month = currentTime.getMonth() + 1;
214                var day = currentTime.getDate() + 1;
215                var year = currentTime.getFullYear();
216                //console.log("Showbanner set: " + year + "-" + month + "-" + day)
217                $.cookie('showonedaybanner', year + "-" + month + "-" + day, { expires: 40, secure: true });
218            }
219        }
220        //buttons: [
221		//{
222		//    addClass: 'createSchedule', text: $("#GotoSchedules").val(), onClick: function ($noty) {
223
224		//    // this = button element
225		//    // $noty = $noty element
226
227		//        $noty.close();
228
229		//    $('html, body').animate({
230		//        scrollTop: $("#schedulecardpanel").offset().top
231		//    }, 900);
232
233		//    $(".js-addEvent").click();
234
235		//    $.cookie('shownotication_showschedulingnotication', "false", { expires: 40 });
236
237		//    ga('send', 'event', $('#brand').val(), 'scheduling_Splash_Screen', "Create Schedule");
238
239		//}
240		//}
241        //]
242    });
243
244
245}
246
247function showinvitedpopup(message, messageid, position) {
248    var ln = noty({
249        layout: 'customBottomCenter',
250        theme: 'notificationMessageTheme',
251        type: 'alert',
252        template: '<div class="notificationMessage" id="' + messageid + '"><div class="noty_message"><span class="noty_text"></span></div></div>',
253        text: message,
254        closeWith: ['button'],
255        callback: {
256            afterShow: function ($noty) {
257                //var notyid = this.options.id;
258                //$.noty.close(notyid);
259            },
260            onCloseClick: function ($noty) {
261                var notyid = this.options.id;
262                var alertid = $("#" + notyid + " .notificationMessage").attr("id");
263                $noty.close();
264            }
265        }//,
266        //buttons: [
267        //{
268        //    addClass: 'btn', text: "Deny", onClick: function ($noty) {
269        //        $noty.close();
270        //        //deny invite, don't send
271        //        $.removeCookie('invitationid', { path: '/' });
272        //    }
273        //},
274        //{
275        //    addClass: 'btn btn-primary', text: 'Accept', onClick: function ($noty) {
276
277        //        $noty.close();
278        //        //Call Accept invite code
279        //        viewModel.account.inviteUser(messageid);
280        //        $.removeCookie('invitationid', { path: '/' });
281        //    }
282        //}
283        //]
284    });
285}
286
287function showlightbanner(message, messageid, position) {
288    var currentTime = new Date();
289    var month = currentTime.getMonth() + 1;
290    var day = currentTime.getDate();
291    var year = currentTime.getFullYear() + 4;
292    
293    var ln = noty({
294        layout: 'topRight',
295        theme: 'notificationMessageTheme',
296        type: 'alert',
297        template: '<div class="notificationMessage" id="' + messageid + '"><div class="noty_message"><span class="noty_text"></span><div id="notylCloseButton">X</div></div></div>',
298        text: message,
299        closeWith: ['button'],
300        callback: {
301            afterShow: function ($noty) {
302                var notyid = this.options.id;
303                ga('send', 'event', $('#brand').val(), 'light_Banner_Popup', "Light Banner Shown");
304                $('#notylCloseButton').on('click', function () {
305                    
306                    $.noty.close(notyid);
307                    $.cookie('shownotication_showlightbanner', year + "-" + month + "-" + day, { expires: 40, secure: true });
308
309                    ga('send', 'event', $('#brand').val(), 'light_Banner_Popup', "Close");
310                });
311            },
312            onCloseClick: function ($noty) {
313                var notyid = this.options.id;
314                var alertid = $("#" + notyid + " .notificationMessage").attr("id");
315                $noty.close();
316                $.cookie('shownotication_showlightbanner', year + "-" + month + "-" + day, { expires: 40, secure: true });
317
318                ga('send', 'event', $('#brand').val(), 'light_Banner_Popup', "Close");
319            }
320        }//,
321        //buttons: [
322		//{
323		//    addClass: 'buyLight', text: $("#BuyLights").val(), onClick: function ($noty) {
324		//        $noty.close();
325
326		//        $.cookie('shownotication_showlightbanner', year + "-" + month + "-" + day, { expires: 40 });
327		       
328		//        window.open($("#BuyLightsURL").val(), '_blank');
329
330		//        ga('send', 'event', $('#brand').val(), 'light_Banner_Popup', "Goto store");
331		//        $.noty.close();
332		//    }
333		//}
334        //]
335    });
336
337
338}
339
340function showMultiuserOnboarding(message, messageid, position) {
341    var n = noty({
342        layout: 'customBottomCenter',
343        theme: 'notificationMessageTheme',
344        type: 'alert',
345        template: '<div class="notificationMessage" id="' + messageid + '"><div class="noty_message"><span class="noty_text"></span><div id="notyCloseButton">X</div></div></div>',
346        text: message,
347        closeWith: ['button'],
348        callback: {
349            afterShow: function ($noty) {
350                var notyid = this.options.id;
351                $('#notyCloseButton').on('click', function () {
352
353                    $.noty.close(notyid);
354                    //$.cookie('shownotication_showschedulingnotication', "false", { expires: 40 });
355                    ga('send', 'event', $('#brand').val(), 'multiuser_Splash_Screen', "Close");
356                });
357            },
358            onCloseClick: function ($noty) {
359                var notyid = this.options.id;
360                var alertid = $("#" + notyid + " .notificationMessage").attr("id");
361                $noty.close();
362               // $.cookie('shownotication_' + alertid, "false", { expires: 40 });
363
364                ga('send', 'event', $('#brand').val(), 'multiuser_Splash_Screen', "Close");
365            }
366        },
367        buttons: [
368		{
369		    addClass: 'createSchedule', text: $("#GotoSchedules").val(), onClick: function ($noty) {
370		        $noty.close();
371
372		       // $.cookie('shownotication_showschedulingnotication', "false", { expires: 40 });
373
374		        ga('send', 'event', $('#brand').val(), 'multiuser_Splash_Screen', "Manage Users");
375
376		    }
377		}
378        ]
379    });
380
381
382}

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.