Changes for page LiveTableServiceWorker
Last modified by bougault on 2022/03/22 17:19
Summary
-
Objects (1 modified, 0 added, 0 removed)
Details
- XWiki.JavaScriptExtension[0]
-
- Code
-
... ... @@ -10,13 +10,11 @@ 10 10 }); 11 11 12 12 self.addEventListener("fetch" , (event) => { 13 - console.log(event.request.url); 14 - /*event.respondWith( async function() { 13 + const pathname = new URL(event.request.url).pathname; 14 + if(pathname === '/bin/get/XWiki/LiveTableResults') { 15 + event.respondWith( async function() { 15 15 let response = await fetch(event.request); 16 - let json = await response.json(); 17 - let rows = json.rows.filter(row => row.doc_viewable === true); 18 - console.log(rows); 19 19 return response; 20 - }) 21 - */18 + }); 19 + } 22 22 });