mirror of
https://github.com/KevinMidboe/zoff.git
synced 2025-10-29 18:00:23 +00:00
Re-added serviceworker, hopefully it works
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
var version = 'v2.5 ';
|
||||
var version = 'v2.6';
|
||||
var CACHE_FILES = [
|
||||
'https://chart.googleapis.com/chart?chs=150x150&cht=qr&chl=https://zoff.no/&choe=UTF-8&chld=L%7C1',
|
||||
'https://fonts.googleapis.com/icon?family=Material+Icons',
|
||||
|
||||
2
static/dist/embed.min.js
vendored
2
static/dist/embed.min.js
vendored
File diff suppressed because one or more lines are too long
4
static/dist/main.min.js
vendored
4
static/dist/main.min.js
vendored
File diff suppressed because one or more lines are too long
@@ -60,13 +60,25 @@ var connection_options = {
|
||||
var fromFront = false;
|
||||
var fromChannel = false;
|
||||
|
||||
if ('serviceWorker' in navigator) {
|
||||
if (navigator.serviceWorker) {
|
||||
navigator.serviceWorker.register('/service-worker.js', {scope: '/'})
|
||||
.then(function (registration) {
|
||||
console.log(registration);
|
||||
})
|
||||
.catch(function (e) {
|
||||
console.error(e);
|
||||
});
|
||||
} else {
|
||||
console.log('Service Worker is not supported in this browser.');
|
||||
}
|
||||
|
||||
/*if ('serviceWorker' in navigator) {
|
||||
navigator.serviceWorker.getRegistration().then(function(r) {
|
||||
try {
|
||||
r.unregister();
|
||||
} catch(e) {}
|
||||
});
|
||||
}
|
||||
}*/
|
||||
|
||||
|
||||
$().ready(function(){
|
||||
|
||||
Reference in New Issue
Block a user