1function setCookie(cname, cvalue, exdays) { 2 var d = new Date(); 3 d.setTime(d.getTime() + (exdays * 24 * 60 * 60 * 1000)); 4 var expires = "expires=" + d.toUTCString(); 5 document.cookie = cname + "=" + cvalue + ";" + expires + ";path=/"; 6} 7 8function getCookie(cname) { 9 var name = cname + "="; 10 var decodedCookie = decodeURIComponent(document.cookie); 11 var ca = decodedCookie.split(';'); 12 for (var i = 0; i < ca.length; i++) { 13 var c = ca[i]; 14 while (c.charAt(0) == ' ') { 15 c = c.substring(1); 16 } 17 if (c.indexOf(name) == 0) { 18 return c.substring(name.length, c.length); 19 } 20 } 21 return false; 22} 23$(document).ready(function () { 24 25 var html_element = $('html'); 26 html_element.on('mouseleave', function(event) { 27 if(!getCookie("popup") && !$('.preventExit').is(":visible")) 28 $('#lead-modal').modal({show: true,backdrop: "static"}); 29 }); 30 31 // setTimeout(function(){ 32 // if(!getCookie("popup")) 33 // $('#lead-modal').modal({show: true,backdrop: "static"}); 34 // }, 2*60*1000); // 2 minutes 35 36 $("#lead-modal .modal-head #restore-modal").click(function () { 37 if ($(this).hasClass("minimize")) { 38 $(this).removeClass("minimize").addClass("maximize"); 39 $("#lead-modal").addClass("minimized"); 40 $(".modal-backdrop").remove(); 41 42 } 43 else if ($(this).hasClass("maximize")) { 44 $(this).removeClass("maximize").addClass("minimize"); 45 $("#lead-modal").removeClass("minimized"); 46 $("body").append('<div class="modal-backdrop show">></div>'); 47 } 48 }); 49 $("#lead-modal").on('hide.bs.modal', function () { 50 setCookie('popup','closed', 7); 51 $(this).removeClass("maximize").addClass("minimize"); 52 $("#lead-modal").removeClass("minimized"); 53 $(".modal-backdrop").remove(); 54 }); 55});
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.