navigator.serviceWorker.register('/service-worker.js').then(function(registration) { console.log('Service Worker registered with scope:', registration.scope); }).catch(function(error) { console.log('Service Worker registration failed:', error); }); // 监听来自 Service Worker 的消息 navigator.serviceWorker.addEventListener('message', (event) => { const currentSite = event.data.currentSite if (currentSite) { // 将 currentSite 存储到 cookie 中 document.cookie = "current_site="+ currentSite + "; path=/; Secure"//注意这里不需要再次编码,sw已经编码过了 console.log('current_site saved to cookie in index:', currentSite) } });
Unfortunately, due to other commitments in my life I will not be able to work on the project for the foreseeable future. I am still happy to answer any questions people may pose about the project.
David Collie
Updated on 17-09-2006
Booth originally started as a collection of scripts to facilitate the creation of Firefox kiosks. At the current time I have decided to focus my efforts on the livecd that incorporates these scripts. I would recommend anyone interested in setting up a kiosk to try the livecd before looking at the scripts on the sourceforge website.
The following are pdf and sxi version of the slides I presented at the Waterloo Campus IT Conference.
I have ported the scripts over to Damn Small Linux. The new iso image is 75 MB in size and can be downloaded from the sourceforge project files section. Note that this does not currently contain java support.