SnapV

SnapV is a Snap! Mod/Project to expand the use of Snap!'s editor.

Blocks preview

Not all blocks are show, some blocks may be outdated
SnapV script pic

Bugs

Fixed bugs!

Unfixed bugs


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!

SnapV

Update: 1.6


Added a new notification block, to send users a little surprise when using. Also coming across with some minor updates and bug fixes.

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!

Download 1.6
Source Code

SnapV

Update: 1.8

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!

Download 1.8
Source Code

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 %&apos;Text&apos;" 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 %&apos;Text&apos;" 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 %&apos;text&apos;" 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 %&apos;text&apos; and with out put %&apos;answer&apos;" 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 %&apos;text&apos;" 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 %&apos;HTML&apos; %&apos;Tab Name&apos;" 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;&#xD;&#xD; myWindow = window.open("", "myWindow", "width=0 + d +,height=0 + e +");&#xD;  myWindow.document.write("&lt;title&gt;" + c + "&lt;/title&gt;" + b + "");</l></block><list><block var="HTML"/><block var="Tab Name"/></list></block></script></block-definition><block-definition s="notifcation %&apos;Text&apos;" 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>&#xD;  if (!("Notification" in window)) {&#xD;    alert("This browser does not support desktop notification");&#xD;  }&#xD;&#xD;  else if (Notification.permission === "granted") {&#xD;    // If it&apos;s okay let&apos;s create a notification&#xD;    var notification = new Notification(a);&#xD;  }&#xD;&#xD; &#xD;  else if (Notification.permission !== "denied") {&#xD;    Notification.requestPermission().then(function (permission) {&#xD;     &#xD;      if (permission === "granted") {&#xD;        var notification = new Notification(a);&#xD;      }&#xD;    });&#xD;  }&#xD;&#xD;  </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);&#xD;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

SnapV

Update: 2.0

Added new comment block, made html block text box a code type, Thanks @ego-lay_atman-bay

Thanks for using SnapV!

Download 2.0
Source Code

Ignore block?

Yes

image
Multi-line input comment block looks better than normal one

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?

1 Like

? = boolean