Skip to content

Commit

Permalink
Merge pull request #27 from souldanger/version-0.0.91
Browse files Browse the repository at this point in the history
fixed deprecated JS in 'sw-register.js'
  • Loading branch information
souldanger authored Aug 14, 2020
2 parents ec134a2 + 287828f commit e53495d
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 4 deletions.
8 changes: 7 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -61,4 +61,10 @@ upgrade library to Workbox version 5.1.1 - see release notes [here](https://gith

# 0.0.9

upgrade library to Workbox version 5.1.3 - see release notes [here](https://github.com/GoogleChrome/workbox/releases/tag/v5.1.3)
upgrade library to Workbox version 5.1.3 - see release notes [here](https://github.com/GoogleChrome/workbox/releases/tag/v5.1.3)

---

# 0.0.91

fixed deprecated JS (initEvent) in sw-regiser.js
4 changes: 2 additions & 2 deletions jekyll-pwa-workbox.gemspec
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Gem::Specification.new do |s|
s.name = 'jekyll-pwa-workbox'
s.version = '0.0.9'
s.date = '2020-05-04'
s.version = '0.0.91'
s.date = '2020-07-14'
s.summary = "PWA Workbox Service Worker for Jekyll."
s.description = "A Jekyll plugin that makes your PWA / Website available offline and lets you install on desktop and mobile.
It generates and injects a precache list into a Workbox v5.1.3 service worker and handles the registration process in a secure way."
Expand Down
2 changes: 1 addition & 1 deletion lib/jekyll-pwa-workbox.rb
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ def write_sw_register()
# add build version in url params
sw_register_file.puts(
<<-SCRIPT
"serviceWorker"in navigator&&navigator.serviceWorker.register("#{@site.baseurl.to_s}/#{@sw_filename}?v=#{@site.time.to_i.to_s}").then(function(e){e.onupdatefound=function(){var t=e.installing;t.onstatechange=function(){switch(t.state){case"installed":if(navigator.serviceWorker.controller){var e=document.createEvent("Event");e.initEvent("sw.update",!0,!0),window.dispatchEvent(e)}}}}}).catch(function(e){console.error("Error during service worker registration:",e)});
"serviceWorker"in navigator&&navigator.serviceWorker.register("#{@site.baseurl.to_s}/#{@sw_filename}?v=#{@site.time.to_i.to_s}").then(function(e){e.onupdatefound=function(){var t=e.installing;t.onstatechange=function(){switch(t.state){case"installed":if(navigator.serviceWorker.controller){var e=document.createEvent("Event");e.Event("sw.update",!0,!0),window.dispatchEvent(e)}}}}}).catch(function(e){console.error("Error during service worker registration:",e)});
SCRIPT
)
sw_register_file.close
Expand Down

0 comments on commit e53495d

Please sign in to comment.