File tree Expand file tree Collapse file tree 2 files changed +22
-0
lines changed Expand file tree Collapse file tree 2 files changed +22
-0
lines changed Original file line number Diff line number Diff line change
1
+ {
2
+ "name" : " Cropper.js" ,
3
+ "short_name" : " Cropper.js" ,
4
+ "description" : " JavaScript image cropper." ,
5
+ "start_url" : " /cropperjs/v2/index.html" ,
6
+ "display" : " standalone" ,
7
+ "background_color" : " #fff" ,
8
+ "theme_color" : " #39f"
9
+ }
Original file line number Diff line number Diff line change
1
+ if ( 'serviceWorker' in navigator ) {
2
+ self . addEventListener ( 'install' , ( ) => {
3
+ self . skipWaiting ( ) ;
4
+ } ) ;
5
+ self . addEventListener ( 'activate' , ( event ) => {
6
+ event . waitUntil (
7
+ caches . keys ( )
8
+ . then ( ( keys ) => Promise . all ( keys . map ( ( key ) => caches . delete ( key ) ) ) )
9
+ . then ( ( ) => navigator . serviceWorker . getRegistrations ( ) )
10
+ . then ( ( registrations ) => Promise . all ( registrations . map ( ( registration ) => registration . unregister ( ) ) ) )
11
+ ) ;
12
+ } ) ;
13
+ }
You can’t perform that action at this time.
0 commit comments