SnapV is a Snap! Mod/Project to expand the use of Snap!'s editor.
Download
Looking to get an older version?; Click here
Report Problem
SnapV is inspired by JSnap
Code was remade with my bear hands
SnapV is a Snap! Mod/Project to expand the use of Snap!'s editor.
Download
Looking to get an older version?; Click here
Report Problem
SnapV is inspired by JSnap
Code was remade with my bear hands
ask _ and with out put _
The text parameter is set, but I think you intended for the answer upvar to be set.
Alert date
This is a reporter, but it doesn't report anything.
crash site
It didn't work; try: world = undefined.
K this will be a bug to fix
Great job! I'll go tell people on my project about this. This is kinda cool with more features.
Thanks! You don’t need to drag attention away from yours!
Thanks for using SnapV!
Added a new ‘get username’ block to fetch the user’s username
Feel free to commit to the github repository via making pull requests, reporting issues or anything else like requesting update/features. I’d loved if you would help make SnapV.
Thanks for using SnapV!
Just tried it out, the [scratchblocks]Open ::extension[/scratchblocks] block is really cool.
Thanks
You're welcome.
I changed snapv version 1.8 so the first input in the [scratchblocks]open :: grey[/scratchblocks] is a code input, because it's html code...
I also changed a few things, here's the xml
<blocks app="Snap! 6, https://snap.berkeley.edu" version="1"><block-definition s="alert %'Text'" type="command" category="other"><header></header><code></code><translations></translations><inputs><input type="%txt">Hello world!</input></inputs><script><block s="doRun"><block s="reportJSFunction"><list><l>a</l></list><l>alert (a)</l></block><list><block var="Text"/></list></block></script></block-definition><block-definition s="ask %'Text'" type="predicate" category="other"><header></header><code></code><translations></translations><inputs><input type="%txt">Are you sure?</input></inputs><script><block s="doReport"><block s="evaluate"><block s="reportJSFunction"><list><l>a</l></list><l>return window.confirm(a);</l></block><list><block var="Text"/></list></block></block></script></block-definition><block-definition s="get text %'text'" type="reporter" category="other"><header></header><code></code><translations></translations><inputs><input type="%txt">What is your name?</input></inputs><script><block s="doReport"><block s="evaluate"><block s="reportJSFunction"><list><l>text</l></list><l>return window.prompt(text);</l></block><list><block var="text"/></list></block></block></script></block-definition><block-definition s="ask %'text' and with out put %'answer'" type="command" category="other"><header></header><code></code><translations></translations><inputs><input type="%txt"></input><input type="%upvar"></input></inputs><script><block s="doSetVar"><l>answer</l><custom-block s="get text %txt"><block var="text"/></custom-block></block></script></block-definition><block-definition s="Alert date" type="command" category="other"><header></header><code></code><translations></translations><inputs></inputs><script><block s="doRun"><block s="reportJSFunction"><list></list><l>alert (Date())</l></block><list></list></block></script></block-definition><block-definition s="Print" type="command" category="other"><header></header><code></code><translations></translations><inputs></inputs><script><block s="doRun"><block s="reportJSFunction"><list></list><l>window.print()</l></block><list></list></block></script></block-definition><block-definition s="open website %'text'" type="command" category="other"><header></header><code></code><translations></translations><inputs><input type="%txt">https://snap.berkeley.edu</input></inputs><script><block s="doRun"><block s="reportJSFunction"><list><l>a</l></list><l> window.open(a)</l></block><list><block var="text"/></list></block></script></block-definition><block-definition s="Open %'HTML' %'Tab Name'" type="command" category="other"><header></header><code></code><translations></translations><inputs><input type="%mlt">Some HTML.</input><input type="%s">Tab Name</input></inputs><script><block s="doRun"><block s="reportJSFunction"><list><l>b</l><l>c</l><l>d</l><l>e</l></list><l>var myWindow;

 myWindow = window.open("", "myWindow", "width=0 + d +,height=0 + e +");
 myWindow.document.write("<title>" + c + "</title>" + b + "");</l></block><list><block var="HTML"/><block var="Tab Name"/></list></block></script></block-definition><block-definition s="notifcation %'Text'" type="command" category="other"><header></header><code></code><translations></translations><inputs><input type="%txt">Hello world!</input></inputs><script><block s="doRun"><block s="reportJSFunction"><list><l>a</l></list><l>
 if (!("Notification" in window)) {
 alert("This browser does not support desktop notification");
 }

 else if (Notification.permission === "granted") {
 // If it's okay let's create a notification
 var notification = new Notification(a);
 }

 
 else if (Notification.permission !== "denied") {
 Notification.requestPermission().then(function (permission) {
 
 if (permission === "granted") {
 var notification = new Notification(a);
 }
 });
 }

 </l></block><list><block var="Text"/></list></block></script></block-definition><block-definition s="get username" 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 ide = this.parentThatIsA(IDE_Morph);
return ide.cloud.username;</l></block><list></list></block></block></script></block-definition></blocks>
Can you make a pull request or upload file please
ok, here's the file https://drive.google.com/file/d/1KyJC8g7CJPhH9fPM-mMFPZ-J33hiyead/view?usp=sharing
Thanks @ego-lay_atman-bay, I have implemented a code text box in version 2.0
Added new comment block, made html block text box a code type, Thanks @ego-lay_atman-bay
Thanks for using SnapV!
Ignore block?
Yes
Since when do we have ¶ as a type hint?? And how come nobody ever tells me anything? What other type hints don't I know about?
? = boolean