1
- var snapVersion = '8.0.99 ' ,
2
- cacheName = ' snap4arduino-pwa' ,
1
+ var s4aVersion = '9.1.1 ' ,
2
+ cacheName = ` snap4arduino-pwa- ${ s4aVersion } ` ,
3
3
filesToCache = [
4
4
'index.html' ,
5
5
@@ -89,6 +89,7 @@ var snapVersion = '8.0.99',
89
89
'locale/lang-sv.js' ,
90
90
'locale/lang-ta.js' ,
91
91
'locale/lang-te.js' ,
92
+ 'locale/lang-ti.js' ,
92
93
'locale/lang-tr.js' ,
93
94
'locale/lang-ua.js' ,
94
95
'locale/lang-zh_CN.js' ,
@@ -122,27 +123,85 @@ var snapVersion = '8.0.99',
122
123
123
124
'libraries/animation_module.xml' ,
124
125
'libraries/apl.xml' ,
126
+ 'libraries/arcs_module.xml' ,
125
127
'libraries/audioComp_module.xml' ,
126
128
'libraries/bar-charts.xml' ,
129
+ 'libraries/bbtSnapExtension.js' ,
127
130
'libraries/biginteger.js' ,
128
131
'libraries/bignumbers.xml' ,
129
132
'libraries/bignums.js' ,
130
- 'libraries/bbtSnapExtension.js ' ,
133
+ 'libraries/bitwise.xml ' ,
131
134
'libraries/cases.xml' ,
132
135
'libraries/colors.xml' ,
136
+ 'libraries/crayons.xml' ,
133
137
'libraries/Eisenbergification.xml' ,
134
138
'libraries/frequency_distribution_module.xml' ,
135
139
'libraries/httpBlocks.xml' ,
136
140
'libraries/HummingbirdBlocks.xml' ,
137
141
'libraries/iteration-composition.xml' ,
138
142
'libraries/leap-library.xml' ,
143
+ 'libraries/list_comprehension_module.xml' ,
139
144
'libraries/list-utilities.xml' ,
140
145
'libraries/localstorage_module.xml' ,
146
+ 'libraries/tiles_module.xml' ,
141
147
'libraries/make-variables.xml' ,
142
148
'libraries/maps_module.xml' ,
149
+ 'libraries/menu_module.xml' ,
150
+ 'libraries/mqttExtension.js' ,
151
+ 'libraries/mqtt.js' ,
152
+ 'libraries/mqtt.xml' ,
143
153
'libraries/parallel_module.xml' ,
144
154
'libraries/pixel_module.xml' ,
155
+ 'libraries/plot_bars_module.xml' ,
156
+ 'libraries/replace_letters_module.xml' ,
145
157
'libraries/schemeNumber.js' ,
158
+ 'libraries/SciSnapExtensions.js' ,
159
+ 'libraries/SciSnap!2Blocks.xml' ,
160
+
161
+ 'libraries/TuneScope.xml' ,
162
+
163
+ // TuneScope dependencies
164
+ 'libraries/TuneScope/TuneScope.js' ,
165
+ 'libraries/TuneScope/TS_init.js' ,
166
+ 'libraries/TuneScope/webmidi.iife.js' ,
167
+ 'libraries/TuneScope/WebAudioFontPlayer.js' ,
168
+
169
+ // TuneScope instruments
170
+ 'libraries/TuneScope/12849_21_FluidR3_GM_sf2_file.js' ,
171
+ 'libraries/TuneScope/12848_21_FluidR3_GM_sf2_file.js' ,
172
+ 'libraries/TuneScope/12847_21_FluidR3_GM_sf2_file.js' ,
173
+ 'libraries/TuneScope/12846_0_FluidR3_GM_sf2_file.js' ,
174
+ 'libraries/TuneScope/12842_0_FluidR3_GM_sf2_file.js' ,
175
+ 'libraries/TuneScope/12835_21_FluidR3_GM_sf2_file.js' ,
176
+ 'libraries/TuneScope/12840_6_JCLive_sf2_file.js' ,
177
+ 'libraries/TuneScope/12869_6_JCLive_sf2_file.js' ,
178
+ 'libraries/TuneScope/0580_GeneralUserGS_sf2_file.js' ,
179
+ 'libraries/TuneScope/0560_GeneralUserGS_sf2_file.js' ,
180
+ 'libraries/TuneScope/0110_GeneralUserGS_sf2_file.js' ,
181
+ 'libraries/TuneScope/0680_JCLive_sf2_file.js' ,
182
+ 'libraries/TuneScope/0121_FluidR3_GM_sf2_file.js' ,
183
+ 'libraries/TuneScope/1070_FluidR3_GM_sf2_file.js' ,
184
+ 'libraries/TuneScope/0460_GeneralUserGS_sf2_file.js' ,
185
+ 'libraries/TuneScope/0600_GeneralUserGS_sf2_file.js' ,
186
+ 'libraries/TuneScope/0730_JCLive_sf2_file.js' ,
187
+ 'libraries/TuneScope/0710_Chaos_sf2_file.js' ,
188
+ 'libraries/TuneScope/0420_JCLive_sf2_file.js' ,
189
+ 'libraries/TuneScope/0400_JCLive_sf2_file.js' ,
190
+ 'libraries/TuneScope/0700_FluidR3_GM_sf2_file.js' ,
191
+ 'libraries/TuneScope/1040_Aspirin_sf2_file.js' ,
192
+ 'libraries/TuneScope/0770_SBLive_sf2.js' ,
193
+ 'libraries/TuneScope/0100_SBLive_sf2.js' ,
194
+ 'libraries/TuneScope/0650_FluidR3_GM_sf2_file.js' ,
195
+ 'libraries/TuneScope/1050_FluidR3_GM_sf2_file.js' ,
196
+ 'libraries/TuneScope/0180_Chaos_sf2_file.js' ,
197
+ 'libraries/TuneScope/0020_JCLive_sf2_file.js' ,
198
+ 'libraries/TuneScope/0260_JCLive_sf2_file.js' ,
199
+ 'libraries/TuneScope/0241_JCLive_sf2_file.js' ,
200
+ 'libraries/TuneScope/0350_JCLive_sf2_file.js' ,
201
+ 'libraries/TuneScope/0291_LesPaul_sf2_file.js' ,
202
+ 'libraries/TuneScope/0320_GeneralUserGS_sf2_file.js' ,
203
+ 'libraries/TuneScope/0230_Aspirin_sf2_file.js' ,
204
+
146
205
'libraries/serial_module.xml' ,
147
206
'libraries/signada.js' ,
148
207
'libraries/signada.xml' ,
@@ -151,8 +210,8 @@ var snapVersion = '8.0.99',
151
210
'libraries/strings.xml' ,
152
211
'libraries/textCostumes_module.xml' ,
153
212
'libraries/try-catch.xml' ,
154
- 'libraries/variadic-reporters.xml' ,
155
213
'libraries/word-sentence.xml' ,
214
+ 'libraries/words_module.xml' ,
156
215
157
216
'libraries/scale.xml' ,
158
217
'libraries/snapJrLib.xml' ,
@@ -178,6 +237,12 @@ var snapVersion = '8.0.99',
178
237
'Costumes/abby-c.svg' ,
179
238
'Costumes/abby-d.svg' ,
180
239
'Costumes/airplane2.png' ,
240
+ 'Costumes/aleassa01.png' ,
241
+ 'Costumes/aleassa02.png' ,
242
+ 'Costumes/aleassa03.png' ,
243
+ 'Costumes/aleassa04.png' ,
244
+ 'Costumes/aleassa05.png' ,
245
+ 'Costumes/aleassa06.png' ,
181
246
'Costumes/alonzo.png' ,
182
247
'Costumes/Alonzo3D.png' ,
183
248
'Costumes/alonzo.svg' ,
@@ -362,6 +427,12 @@ var snapVersion = '8.0.99',
362
427
'Costumes/dee-c.svg' ,
363
428
'Costumes/dee-d.svg' ,
364
429
'Costumes/dee-e.svg' ,
430
+ 'Costumes/derec01.png' ,
431
+ 'Costumes/derec02.png' ,
432
+ 'Costumes/derec03.png' ,
433
+ 'Costumes/derec04.png' ,
434
+ 'Costumes/derec05.png' ,
435
+ 'Costumes/derec06.png' ,
365
436
'Costumes/devin-a.svg' ,
366
437
'Costumes/devin-b.svg' ,
367
438
'Costumes/devin-c.svg' ,
@@ -479,13 +550,26 @@ var snapVersion = '8.0.99',
479
550
'Costumes/home_button.svg' ,
480
551
'Costumes/horse1-a.svg' ,
481
552
'Costumes/horse1-b.svg' ,
553
+ 'Costumes/jahrd01.png' ,
554
+ 'Costumes/jahrd02.png' ,
555
+ 'Costumes/jahrd03.png' ,
556
+ 'Costumes/jahrd04.png' ,
557
+ 'Costumes/jahrd05.png' ,
558
+ 'Costumes/jahrd06.png' ,
482
559
'Costumes/jaime-a.png' ,
483
560
'Costumes/jaime-b.png' ,
484
561
'Costumes/jaime_walking-a.png' ,
485
562
'Costumes/jaime_walking-b.png' ,
486
563
'Costumes/jaime_walking-c.png' ,
487
564
'Costumes/jaime_walking-d.png' ,
488
565
'Costumes/jaime_walking-e.png' ,
566
+ 'Costumes/jamet01.png' ,
567
+ 'Costumes/jamet02.png' ,
568
+ 'Costumes/jamet03.png' ,
569
+ 'Costumes/jamet04.png' ,
570
+ 'Costumes/jamet05.png' ,
571
+ 'Costumes/jamet06.png' ,
572
+ 'Costumes/jamet06-wall.png' ,
489
573
'Costumes/jay.gif' ,
490
574
'Costumes/jeans-a.svg' ,
491
575
'Costumes/jeans-b.svg' ,
@@ -601,6 +685,12 @@ var snapVersion = '8.0.99',
601
685
'Costumes/ruby-b.png' ,
602
686
'Costumes/sail-boat.png' ,
603
687
'Costumes/sam.gif' ,
688
+ 'Costumes/sarron01.png' ,
689
+ 'Costumes/sarron02.png' ,
690
+ 'Costumes/sarron03.png' ,
691
+ 'Costumes/sarron04.png' ,
692
+ 'Costumes/sarron05.png' ,
693
+ 'Costumes/sarron06.png' ,
604
694
'Costumes/saxophone-a.svg' ,
605
695
'Costumes/saxophone-b.svg' ,
606
696
'Costumes/scarf1.svg' ,
@@ -661,6 +751,12 @@ var snapVersion = '8.0.99',
661
751
'Costumes/trombone-b.svg' ,
662
752
'Costumes/trumpet-a2.svg' ,
663
753
'Costumes/trumpet-a.svg' ,
754
+ 'Costumes/turtle01_colour.png' ,
755
+ 'Costumes/turtle02_colour_resized.png' ,
756
+ 'Costumes/turtle03.png' ,
757
+ 'Costumes/turtle04.png' ,
758
+ 'Costumes/turtle05.png' ,
759
+ 'Costumes/turtle06.png' ,
664
760
'Costumes/ukulele.svg' ,
665
761
'Costumes/umbrella.png' ,
666
762
'Costumes/unicorn1.png' ,
@@ -764,13 +860,12 @@ self.addEventListener('activate', (evt) => {
764
860
} ) ;
765
861
766
862
/* Serve cached content when offline */
767
- self . addEventListener ( 'fetch' , function ( e ) {
768
- e . respondWith (
769
- caches . match (
770
- e . request ,
771
- { 'ignoreSearch' : true }
772
- ) . then ( function ( response ) {
773
- return response || fetch ( e . request ) ;
774
- } )
775
- ) ;
863
+ self . addEventListener ( 'fetch' , function ( event ) {
864
+ event . respondWith (
865
+ fetch ( event . request ) . catch ( function ( e ) {
866
+ return caches . open ( cahceName ) . then ( function ( cache ) {
867
+ return cache . match ( event . request ,
868
+ { 'ignoreSearch' : true } ) . then ( response => response ) ;
869
+ } ) ;
870
+ } ) ) ;
776
871
} ) ;
0 commit comments