We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent cab211d commit cc315daCopy full SHA for cc315da
index.html
@@ -49,6 +49,16 @@ <h1>Welcome to Our School SMP!</h1>
49
window.onload = function () {
50
showProfileBar(); // Display profile bar if logged in
51
};
52
+
53
+ if ('serviceWorker' in navigator) {
54
+ window.addEventListener('load', function() {
55
+ navigator.serviceWorker.register('/service-worker.js').then(function(registration) {
56
+ console.log('Service Worker registered with scope: ', registration.scope);
57
+ }).catch(function(error) {
58
+ console.log('Service Worker registration failed: ', error);
59
+ });
60
61
+ }
62
</script>
63
64
<script defer src="auth.js"></script>
0 commit comments