Files
darkshy.bronyfurry.com/js/pwabuilder-sw.js
DarkShyMW de080ca62e modified: js/pwabuilder-sw.js
$('img').bind('contextmenu', function(e) {
    return false;
});
2023-03-12 20:53:20 +03:00

21 lines
507 B
JavaScript

// This is the "Offline copy of pages" service worker
const CACHE = "darkshy-offline";
importScripts('https://storage.googleapis.com/workbox-cdn/releases/5.1.2/workbox-sw.js');
self.addEventListener("message", (event) => {
if (event.data && event.data.type === "SKIP_WAITING") {
self.skipWaiting();
}
});
workbox.routing.registerRoute(
new RegExp('/*'),
new workbox.strategies.StaleWhileRevalidate({
cacheName: CACHE
})
);
$('img').bind('contextmenu', function(e) {
return false;
});