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.31
edited by bougault
on 2022/03/21 14:06
Change comment: There is no comment for this version
To version 4.35
edited by bougault
on 2022/03/21 14:14
Change comment: There is no comment for this version

Summary

Details

XWiki.JavaScriptExtension[0]
Code
... ... @@ -11,14 +11,11 @@
11 11  
12 12  self.addEventListener("fetch" , (event) => {
13 13   const pathname = new URL(event.request.url).pathname;
14 - console.log(pathname);
15 -
16 - /*event.respondWith( async function() {
17 - let response = await fetch(event.request);
18 - let json = await response.json();
19 - let rows = json.rows.filter(row => row.doc_viewable === true);
20 - console.log(rows);
21 - return response;
22 - })
23 - */
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 + }
24 24  });