This repository was archived by the owner on Sep 15, 2020. It is now read-only.
File tree Expand file tree Collapse file tree 4 files changed +25
-19
lines changed Expand file tree Collapse file tree 4 files changed +25
-19
lines changed Original file line number Diff line number Diff line change 33/node_modules /
44/source /assets /js /vendor /
55/source /assets /js /google-analytics.js
6+ /source /assets /js /sw.js
Original file line number Diff line number Diff line change @@ -79,7 +79,6 @@ module.exports = function(grunt) {
7979 '<%= dirs.src %>/assets/js/detect-os.js' ,
8080 '<%= dirs.src %>/assets/js/img-defer.js' ,
8181 '<%= dirs.src %>/assets/js/no-js-class.js' ,
82- '<%= dirs.src %>/assets/js/pwa.js' ,
8382 '<%= dirs.src %>/assets/js/google-analytics.js'
8483 ] ,
8584 dest : '<%= dirs.dest %>/assets/js/pack.js'
@@ -145,8 +144,7 @@ module.exports = function(grunt) {
145144 minify : {
146145 files : {
147146 '<%= concat.js.dest %>' : '<%= concat.js.dest %>' ,
148- '<%= concat.jqueryJS.dest %>' : '<%= concat.jqueryJS.dest %>' ,
149- '<%= concat.sw.dest %>' : '<%= concat.sw.dest %>'
147+ '<%= concat.jqueryJS.dest %>' : '<%= concat.jqueryJS.dest %>'
150148 }
151149 }
152150 } ,
Load Diff This file was deleted.
Original file line number Diff line number Diff line change 1- // empty for now
1+ ( function ( ) {
2+ 'use strict' ;
3+
4+ if ( 'serviceWorker' in navigator ) {
5+ window . addEventListener ( 'load' , function ( ) {
6+ navigator . serviceWorker . getRegistrations ( ) . then ( function ( registrations ) {
7+ for ( var registration of registrations ) {
8+ registration . unregister ( )
9+ . then ( function ( ) {
10+ return self . clients . matchAll ( ) ;
11+ } )
12+ . then ( function ( clients ) {
13+ clients . forEach ( function ( client ) {
14+ if ( client . url && 'navigate' in client ) {
15+ client . navigate ( client . url ) ;
16+ }
17+ } ) ;
18+ } ) ;
19+ }
20+ } ) ;
21+ } ) ;
22+ }
23+ } ) ( ) ;
You can’t perform that action at this time.
0 commit comments