1let xlng=new Array;function setLanguage(e){"de"==e?(xlng[0]="Ãffnen",xlng[1]="SchlieÃen"):"en"==e&&(xlng[0]="Open",xlng[1]="Close")}function FetchMsg(u,h,w){var e=self.location.origin+"/index.php",t=new FormData;return t.append("gnote","notification"),fetch(e,{method:"POST",body:t}).then(function(e){return e.text().then(function(e){function t(e,t,n){e=e.split(t);return e.length<2?"":e[1].split(n)[0]}let c=w?Date.now().toString():t(e,"<id><![CDATA[","]]></id>"),s=t(e,"<label><![CDATA[","]]></label>"),r=t(e,"<date><![CDATA[","]]></date>"),g=t(e,"<expire><![CDATA[","]]></expire>"),d=t(e,"<title><![CDATA[","]]></title>"),f=t(e,"<text><![CDATA[","]]></text>"),p=t(e,"<url><![CDATA[","]]></url>");return setLanguage(t(e,"<language><![CDATA[","]]></language>")),new Promise(function(n,o){let l=indexedDB.open("NotificationDB",1);l.onupgradeneeded=function(){var e=l.result;e.objectStoreNames.contains("NotificationStore")||((e=e.createObjectStore("NotificationStore",{keyPath:"name"})).createIndex("IDindex","name"),e.put({name:"note_id",id:"00000000"}))},l.onsuccess=function(){let e=l.result;var t=e.transaction("NotificationStore","readwrite");let i=t.objectStore("NotificationStore"),a=i.get("note_id");a.onsuccess=function(){var e,t,n;(a.result?a.result.id:"0")!=c&&1==h&&(i.put({name:"note_id",id:c}),"off"!=c.toLowerCase())&&1<(n=r.split("T")).length&&(e=n[0].split("-"),n=n[1].split(":"),e=new Date(e[0],parseInt(e[1])-1,e[2],n[0],n[1]).getTime(),t=(n=g.split("T"))[0].split("-"),n=n[1].split(":"),t=new Date(t[0],parseInt(t[1])-1,t[2],n[0],n[1]).getTime(),e<=(n=Date.now())&&n<=t||1==w)&&1==u&&"off"!=c.toLowerCase()&&(self.registration.showNotification(d,{body:f,icon:"/img/lib/favicon.png",tag:s,data:p,actions:[{action:"open",title:xlng[0]},{action:"close",title:xlng[1]}]}),self.navigator)&&"setAppBadge"in self.navigator&&self.navigator.setAppBadge(1)},t.oncomplete=function(){e.close(),n()},t.onerror=function(){o()}},l.onerror=function(){o()}})})})}xlng[0]="Open",xlng[1]="Close",self.addEventListener("message",e=>{"getNotification"==e.data&&FetchMsg(!0,!1,!1),"getLastNotification"==e.data&&FetchMsg(!0,!0,!0),"setLanguage:de"==e.data&&setLanguage("de"),"setLanguage:en"==e.data&&setLanguage("en")}),self.addEventListener("periodicsync",e=>{"get-notification"===e.tag&&e.waitUntil(FetchMsg(!0,!0,!1))}),self.addEventListener("sync",e=>{e.tag}),self.addEventListener("notificationclick",e=>{if(e.notification.close(),"clearAppBadge"in navigator&&e.waitUntil(navigator.clearAppBadge().catch(()=>{})),"open"===e.action||!e.action){var t="string"==typeof e.notification.data?e.notification.data:"/";const n=new URL(t,self.location.origin).href;t=self.clients.matchAll({type:"window",includeUncontrolled:!0}).then(e=>{const t=new URL(n);e=e.find(e=>{e=new URL(e.url);return e.origin===t.origin&&e.pathname===t.pathname});return e&&"function"==typeof e.focus?e.focus().then(e=>e||self.clients.openWindow(n)).catch(()=>self.clients.openWindow(n)):self.clients.openWindow?self.clients.openWindow(n):void 0});e.waitUntil(t)}}),self.addEventListener("notificationclose",e=>{"clearAppBadge"in navigator&&e.waitUntil(navigator.clearAppBadge().catch(e=>{console.warn("Badge-Reset fehlgeschlagen:",e)}))}),self.addEventListener("fetch",function(e){e.isTrusted});
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.