1const delay = window.sno_student_news_source_ajax_object.duration 2const popupLastShown = parseFloat(window.localStorage.getItem("popupLastShown")) 3 4jQuery(document).ready(($) => { 5 if (shouldShowPopup()) { 6 show() 7 } 8 9 $("body").on("click", "#cancel-mobile-popup", (e) => { 10 e.preventDefault() 11 $(".sns-mobile-popup-container").hide(400) 12 window.localStorage.setItem("popupLastShown", (Date.now() / 1000).toString()) 13 }) 14 15 $("body").on("click", "#open-in-app", (e) => { 16 e.preventDefault() 17 hidePopup() 18 const dataLink = $("#open-in-app").data("link") 19 if (dataLink) { 20 window.location = dataLink 21 } 22 }) 23 24 function hidePopup() { 25 $(".sns-mobile-popup-container").hide(400) 26 } 27 28 function shouldShowPopup() { 29 if (!popupLastShown) { 30 return true 31 } 32 33 if (delay === "never-show-again") { 34 return false 35 } 36 37 const now = Date.now() / 1000 38 return popupLastShown + Number(delay) * 86400 < now 39 } 40 41 function show() { 42 $(".sns-mobile-popup-container").show(400) 43 } 44})
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.