Skip to content

Commit cc315da

Browse files
authored
Update index.html
1 parent cab211d commit cc315da

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

index.html

+10
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,16 @@ <h1>Welcome to Our School SMP!</h1>
4949
window.onload = function () {
5050
showProfileBar(); // Display profile bar if logged in
5151
};
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+
}
5262
</script>
5363

5464
<script defer src="auth.js"></script>

0 commit comments

Comments
 (0)