Failed to execute template. Cause: [Access denied when checking [script] access to [xwiki:Collaboratory.UX.HbpSkin.WebHome] for user [xwiki:XWiki.Admin]]. Click on this message for details.

LiveTableServiceWorker - HBP Wiki

IAM21 instance, do not create collab nor modify a team, your changes will be lost


Changes for page LiveTableServiceWorker

Last modified by bougault on 2022/03/22 17:19

From version 4.35
edited by bougault
on 2022/03/21 14:14
Change comment: There is no comment for this version
To version 2.3
edited by bougault
on 2022/03/21 10:28
Change comment: There is no comment for this version

Summary

Details

Page properties
Parent
... ... @@ -1,1 +1,0 @@
1 -Main.WebHome
XWiki.JavaScriptExtension[0]
Code
... ... @@ -1,21 +1,16 @@
1 -$response.addHeader('Service-Worker-Allowed', '/bin/view/Membership')
2 -$response.setContentType("text/javascript")
3 -self.addEventListener("install" , event => {
4 - console.log(event);
1 +console.log('hello sw');
2 +self.addEventListener('fetch', function(event) {
3 +/*
4 + event.respondWith(
5 + fetch(event.request).then(function(response) {
6 + if (response.status === 404) {
7 + return fetch("/path/to/404error.gif");
8 + }
9 + return response;
10 + }).catch(function() {
11 + return new Response("Uh oh, that totally failed!");
12 + })
13 + );
14 +*/
5 5  });
6 6  
7 -self.addEventListener("activate" , event => {
8 - console.log(event);
9 - clients.claim();
10 -});
11 -
12 -self.addEventListener("fetch" , (event) => {
13 - const pathname = new URL(event.request.url).pathname;
14 - if(pathname === '/bin/get/XWiki/LiveTableResults') {
15 - event.respondWith( async function() {
16 - return fetch(event.request).then(response => {
17 - return response;
18 - });
19 - });
20 - }
21 -});
Parse content
... ... @@ -1,1 +1,0 @@
1 -Yes
Use this extension
... ... @@ -1,1 +1,0 @@
1 -onDemand