Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Workbox #162

Open
wants to merge 14 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions _config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -65,3 +65,5 @@ exclude:
- README.md
- node_modules
- scripts
- sw.js
- workbox-config.js
2 changes: 1 addition & 1 deletion _includes/pagination.html
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
{% if page == 1%}
"/"
{% else %}
"{{ site.paginate_path | replace: ':num', page }}"
"{{ site.paginate_path | replace: ':num', page }}/"
{% endif %}>
{% assign pageMinusOne = paginator.page | minus: 1 %}
{% if page == pageMinusOne %}
Expand Down
4 changes: 3 additions & 1 deletion _layouts/blank.html
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,9 @@
{% include svg-icons.html %}
<script>
if ('serviceWorker' in navigator) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since we are making changes, can me add a friendly console warning message if service workers are not supported?

Something like:

if ('serviceWorker' in navigator) {
  // ...
} else {
  console.warn('Service workers are not supported by this browser. :(');
}

navigator.serviceWorker.register('/sw.js');
navigator.serviceWorker.register('/revisioned-sw.js').catch(e => console.error('Problem installing service worker:', e));
} else {
console.log('Your browser does not support service workers :(');
}
</script>
</body>
Expand Down
23 changes: 0 additions & 23 deletions js/vendor/sw-cacheable-response.min.js

This file was deleted.

Loading