1var deferredPrompt; 2 3window.addEventListener('beforeinstallprompt', function(event) { 4 event.preventDefault() 5 6 pwaDeleteCookie('pwa') 7 deferredPrompt = event 8}); 9 10function pwaSetCookie(name, value, days) { 11 var d = new Date; 12 d.setTime(d.getTime() + 24*60*60*1000*days); 13 document.cookie = name + "=" + value + ";path=/;expires=" + d.toGMTString(); 14} 15 16function pwaGetCookie(name) { 17 var v = document.cookie.match('(^|;) ?' + name + '=([^;]*)(;|$)'); 18 return v ? v[2] : null; 19} 20 21function pwaDeleteCookie(name) { 22 pwaSetCookie(name, '', -1); 23} 24 25 26 27
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.