kopia lustrzana https://github.com/backface/turtlestitch
added new localstorage "Data Base" library
rodzic
4dcd4b24a6
commit
85c844f9f4
|
@ -4,6 +4,7 @@
|
|||
|
||||
### 2020-08-07
|
||||
* new dev version
|
||||
* added new localstorage library
|
||||
|
||||
## 6.1.4:
|
||||
* fixed "green flag" symbol size for embedded proects (for real ^^)=
|
||||
|
|
|
@ -12,11 +12,12 @@ variadic-reporters.xml Variadic reporters Versions of +, x, AND, and OR that tak
|
|||
~ ~
|
||||
maps_module.xml World Map Add interactive maps to projects
|
||||
textCostumes_module.xml Text Costumes Generate costumes from letters or words of text.
|
||||
speech_module.xml Text to speech output text using speech synthesis.
|
||||
animation_module.xml Animation glide, grow and rotate using easing functions.
|
||||
pixel_module.xml Pixels manipulate costumes pixel-wise.
|
||||
audioComp_module.xml Audio Comp analyze, manipulate and generate sound samples.
|
||||
speech_module.xml Text to Speech Output text using speech synthesis.
|
||||
animation_module.xml Animation Glide, grow and rotate using easing functions.
|
||||
pixel_module.xml Pixels Manipulate costumes pixel-wise.
|
||||
audioComp_module.xml Audio Comp Analyze, manipulate and generate sound samples.
|
||||
frequency_distribution_module.xml Frequency Distribution Analysis Analyze data for frequency distribution
|
||||
localstorage_module.xml Data Base Persistent key-value storage across Snap! sessions in the same browser
|
||||
~ ~
|
||||
~ ~
|
||||
~ ~
|
||||
|
|
|
@ -0,0 +1 @@
|
|||
<blocks app="Snap! 6, https://snap.berkeley.edu" version="1"><block-definition s="store key: %'key' value: %'value' in browser" type="command" category="other"><header></header><code></code><translations></translations><inputs><input type="%s"></input><input type="%s"></input></inputs><script><block s="doRun"><block s="reportJSFunction"><list><l>key</l><l>value</l></list><l>window.localStorage.setItem('-snap-project-' + key, '' + value);</l></block><list><block var="key"/><block var="value"/></list></block></script></block-definition><block-definition s="stored data in browser" type="reporter" category="other"><header></header><code></code><translations></translations><inputs></inputs><script><block s="doReport"><block s="evaluate"><block s="reportJSFunction"><list></list><l>var str = window.localStorage,
 len = str.length,
 result = [],
 key,
 i;
for (i = 0; i < len; i += 1) {
 key = str.key(i);
 if (key.startsWith('-snap-project-')) {
 result.push(new List([key.slice(14), str.getItem(key)]));
 }
}
return new List(result);</l></block><list></list></block></block></script></block-definition><block-definition s="remove key: %'key' in browser" type="command" category="other"><header></header><code></code><translations></translations><inputs><input type="%s"></input></inputs><script><block s="doRun"><block s="reportJSFunction"><list><l>key</l></list><l>window.localStorage.removeItem('-snap-project-' + key);</l></block><list><block var="key"/></list></block></script></block-definition><block-definition s="clear data in browser" type="command" category="other"><header></header><code></code><translations></translations><inputs></inputs><script><block s="doWarp"><script><block s="doForEach"><l>item</l><custom-block s="stored data in browser"></custom-block><script><custom-block s="remove key: %s in browser"><block s="reportListItem"><l>1</l><block var="item"/></block></custom-block></script></block></script></block></script></block-definition></blocks>
|
Ładowanie…
Reference in New Issue