~wuz/wuz.sh

ref: 4e0b33724201a130df7d5769395b577f2820dca5 wuz.sh/_includes/layouts/footer.njk -rw-r--r-- 459 bytes
4e0b3372 — Conlin Durbin Add service worker 1 year, 29 days ago
                                                                                
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
<script>
if ('serviceWorker' in navigator) {
  window.addEventListener('load', function() {
    navigator.serviceWorker.register('/sw.js').then(function(registration) {
      // Registration was successful
      console.log('ServiceWorker registration successful with scope: ', registration.scope);
    }, function(err) {
      // registration failed :(
      console.log('ServiceWorker registration failed: ', err);
    });
  });
}
</script>
</body>
</html>