Changes for page Membership
Last modified by superadmin on 2022/06/07 18:01
Summary
-
Page properties (2 modified, 0 added, 0 removed)
-
Objects (1 modified, 0 added, 0 removed)
Details
- Page properties
-
- Author
-
... ... @@ -1,1 +1,1 @@ 1 -XWiki.b ougault1 +XWiki.hbpadmin - Content
- XWiki.JavaScriptExtension[0]
-
- Code
-
... ... @@ -1,24 +1,9 @@ 1 1 if ('serviceWorker' in navigator) { 2 2 navigator.serviceWorker.register('/bin/jsx/LiveTableServiceWorker?minify=false', { 'scope': '/bin/view/Membership'}) 3 3 .then((reg) => { 4 - if(reg.installing) { 5 - const sw = reg.installing || reg.waiting; 6 - sw.onstatechange = function() { 7 - if (sw.state === 'installed') { 8 - // SW installed. Reload for SW intercept serving SW-enabled page. 9 - window.location.reload(); 10 - } 11 - }; 12 - } else if (reg.active) { 13 - // something's not right or SW is bypassed. previously-installed SW should have redirected this request to different page 14 - throw(new Error('Service Worker is installed and not redirecting.')) 15 -} 16 - 17 - // registration worked 18 - console.log('Registration succeeded. Scope is ' + reg.scope); 4 + reg.update(); 19 19 }).catch((error) => { 20 - // registration failed 21 - console.log('Registration failed with ' + error); 6 + console.error('Registration failed with ' + error); 22 22 }); 23 23 } 24 24