PageSourceSearch

https://pietrodefilippis.it/wp-content/litespeed/js/276ea4770dd5b5d78d6db4fb57ad87fa.js?ver=0aec4

js pietrodefilippis.it collected 2026-09-24 15:04:35 UTC 3,193 bytes, 21 lines download raw bytes

1(function(){'use strict';var TK=window.TKPWA;if(!TK){return}
2var cfg=TK.cfg;var i18n=cfg.i18n||{};TK.safe('offline-indicator',function(){if(!cfg.offlineIndicator){return}
3var bar=null;var timer=null;var down=!1;function render(isDown){if(!document.body){return}
4if(!bar){bar=document.createElement('div');bar.setAttribute('role','status');bar.setAttribute('aria-live','polite');document.body.appendChild(bar)}
5clearTimeout(timer);bar.className='offline-ui '+(isDown?'offline-ui-down':'offline-ui-up');bar.textContent=isDown?i18n.offlineDown:i18n.offlineUp;bar.style.display='block';if(!isDown){timer=setTimeout(function(){bar.style.display='none'},3000)}}
6function confirmDown(){fetch(cfg.home+'?tkpwa_ping='+Date.now(),{method:'HEAD',cache:'no-store',credentials:'omit'}).then(function(){if(down){down=!1;render(!1)}}).catch(function(){if(!down){down=!0;render(!0)}})}
7window.addEventListener('offline',confirmDown);window.addEventListener('online',function(){if(down){down=!1;render(!1)}});TK.ready(function(){if(navigator.onLine===!1){down=!0;render(!0)}})});TK.safe('offline-forms',function(){if(!cfg.offlineForms){return}
8var PREFIX='tkpwa_offline_form_';var MAX_AGE=864e5;function formKey(form,idx){var action=form.getAttribute('action')||location.href;return PREFIX+(form.id||(action+'#'+idx))}
9function serialize(form){var data=new URLSearchParams();Array.prototype.forEach.call(form.elements,function(f){if(!f.name||f.disabled||['file','reset','submit','button','password'].indexOf(f.type)!==-1){return}
10if((f.type==='checkbox'||f.type==='radio')&&!f.checked){return}
11if(f.tagName==='SELECT'&&f.multiple){Array.prototype.forEach.call(f.options,function(o){if(o.selected){data.append(f.name,o.value)}});return}
12data.append(f.name,f.value||'')});return data.toString()}
13function flush(){var keys=[];try{for(var i=0;i<localStorage.length;i++){var k=localStorage.key(i);if(k&&k.indexOf(PREFIX)===0){keys.push(k)}}}catch(e){return}
14keys.forEach(function(k){var entry=null;try{entry=JSON.parse(TK.storage.get(k)||'null')}catch(e){}
15if(!entry||!entry.action||Date.now()-entry.time>MAX_AGE){TK.storage.remove(k);return}
16var method=(entry.method||'POST').toUpperCase();var url=entry.action;var opts={method:method,credentials:'same-origin',headers:{'Content-Type':'application/x-www-form-urlencoded'}};if(method==='GET'){url+=(url.indexOf('?')===-1?'?':'&')+entry.data;delete opts.headers}else{opts.body=entry.data}
17fetch(url,opts).then(function(res){if(res.ok){TK.storage.remove(k);TK.toast(i18n.formSent,3000)}}).catch(function(){})})}
18TK.ready(function(){Array.prototype.forEach.call(document.getElementsByTagName('form'),function(form,idx){form.addEventListener('submit',function(e){if(navigator.onLine!==!1||e.defaultPrevented){return}
19var action=form.action||location.href;try{if(new URL(action,location.href).origin!==location.origin){return}}catch(err){return}
20e.preventDefault();var saved=TK.storage.set(formKey(form,idx),JSON.stringify({time:Date.now(),action:action,method:form.method||'POST',data:serialize(form)}));if(saved){TK.toast(i18n.formSaved,3000);form.reset()}})})});window.addEventListener('online',flush);TK.onLoad(function(){if(navigator.onLine!==!1){flush()}})})})()
21;

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.