Link service worker on main pages

This commit is contained in:
Korbs 2023-12-15 00:09:10 -05:00
parent 92709cca8d
commit e4e3ee6aa1
6 changed files with 36 additions and 6 deletions

View file

@ -93,3 +93,9 @@ a {
</div> </div>
</body> </body>
</html> </html>
<script>
if ('serviceWorker' in navigator) {
navigator.serviceWorker.register('service-worker.js');
}
</script>

View file

@ -1417,3 +1417,8 @@ document.getElementById('search').addEventListener('keyup', function () {
<% } catch (error) { %> <% } catch (error) { %>
<% } %> <% } %>
<script>
if ('serviceWorker' in navigator) {
navigator.serviceWorker.register('service-worker.js');
}
</script>

View file

@ -109,3 +109,8 @@ body {
</div> </div>
</body> </body>
</html> </html>
<script>
if ('serviceWorker' in navigator) {
navigator.serviceWorker.register('service-worker.js');
}
</script>

View file

@ -3131,3 +3131,9 @@ window.addEventListener('load', () => {
<% } catch (error) { %> <% } catch (error) { %>
<%- error %> <%- error %>
<% } %> <% } %>
<script>
if ('serviceWorker' in navigator) {
navigator.serviceWorker.register('service-worker.js');
}
</script>

View file

@ -469,4 +469,8 @@ Web
</body> </body>
<script>
if ('serviceWorker' in navigator) {
navigator.serviceWorker.register('service-worker.js');
}
</script>

View file

@ -578,4 +578,8 @@ font-weight: 1000;
</body> </body>
<script>
if ('serviceWorker' in navigator) {
navigator.serviceWorker.register('service-worker.js');
}
</script>