JSnap

jsnapbanner
A simple JavaScript library that uses the windows feature.
You can alert, prompt, and confirm.
Use the issues or this topic if you need help or have suggestions about JSnap.
Download JSnap
Issues Tab

Can't wait to see some projects with it, but I just have to wait and see.

1 Like

in the confirm block, you don't need to do untitled script pic - 2020-07-27T151940.184 you can just do untitled script pic - 2020-07-27T152004.955

(also, you don't need to use the variable, you can just put the call javascript function inside the if then else boolean. Same with the prompt reporter, but you put the call block inside the report block)

Cool, I will run this later!

Speaking as such, I manage to improve the blocks like what you said. Changing the prompt and confirm blocks just into returning the answer from the JavaScript function.

Here's the pull request and my forked edit.

I have pulled it to the main project, thank you for the feedback!

This is very nice. I can definitely see myself using it in projects. The PROMPT block does something we can already do within Snap!, but the POPUP block is good for messages too big for a speech balloon.

Cool, I thought it was going to be a computer popup but it was a alert popup

or you can just do
untitled script pic (11)

I made a litte version like it

<project name="Sample Project | JavaS Snap!" app="Snap! 6, https://snap.berkeley.edu" version="1"><notes>JavaS Snap! Sample</notes><thumbnail>data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAKAAAAB4CAYAAAB1ovlvAAACeklEQVR4Xu3XsWnDUABF0W/tYk3gRVxrCs8ll55He7iSIZCQJglpfEEctRI8dP8BodO+7/twKRAVOAEYlTf7UQBAENICAKb5jQPIQFoAwDS/cQAZSAsAmOY3DiADaQEA0/zGAWQgLQBgmt84gAykBQBM8xsHkIG0AIBpfuMAMpAWADDNbxxABtICAKb5jQPIQFoAwDS/cQAZSAsAmOY3DiADaQEA0/zGAWQgLQBgmt84gAykBQBM8xsHkIG0AIBpfuMAMpAWADDNbxxABtICAKb5jQPIQFoAwDS/cQAZSAsAmOY3DiADaQEA0/zGAWQgLQBgmt84gAykBQBM8xsHkIG0AIBpfuMAMpAWADDNbxxABtICAKb5jQPIQFoAwDS/cQAZSAsAmOY3DiADaQEAf8h/uVzG7XYby7KkB3T0cQB/OeHr9fp1d9u2cb/fx/l8PrqJt74fgH/k/o7w89Fpmsbz+RyPx+Oth3XEMQABTF0D+I9P8LquY57n9MCONg6gn5DUNIBpfuMAMpAWADDNbxxABtICAKb5jQPIQFoAwDS/cQAZSAsAmOY3DiADaQEA0/zGAWQgLQBgmt84gAykBQBM8xsHkIG0AIBpfuMAMpAWADDNbxxABtICAKb5jQPIQFoAwDS/cQAZSAsAmOY3DiADaQEA0/zGAWQgLQBgmt84gAykBQBM8xsHkIG0AIBpfuMAMpAWADDNbxxABtICAKb5jQPIQFoAwDS/cQAZSAsAmOY3DiADaQEA0/zGAWQgLQBgmt84gAykBQBM8xsHkIG0AIBpfuMAMpAWADDNbxxABtICAKb5jQPIQFoAwDS/cQAZSAsAmOY3/gLXCfyohseIjQAAAABJRU5ErkJggg==</thumbnail><stage name="Stage" width="480" height="360" costume="0" color="255,255,255,1" tempo="60" threadsafe="false" penlog="false" volume="100" pan="0" lines="round" ternary="false" hyperops="true" codify="false" inheritance="true" sublistIDs="false" scheduled="false" id="1"><pentrails>data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAeAAAAFoCAYAAACPNyggAAAOhUlEQVR4Xu3VwQkAAAjEMN1/abewn7jAQRC64wgQIECAAIF3gX1fNEiAAAECBAiMAHsCAgQIECAQCAhwgG6SAAECBAgIsB8gQIAAAQKBgAAH6CYJECBAgIAA+wECBAgQIBAICHCAbpIAAQIECAiwHyBAgAABAoGAAAfoJgkQIECAgAD7AQIECBAgEAgIcIBukgABAgQICLAfIECAAAECgYAAB+gmCRAgQICAAPsBAgQIECAQCAhwgG6SAAECBAgIsB8gQIAAAQKBgAAH6CYJECBAgIAA+wECBAgQIBAICHCAbpIAAQIECAiwHyBAgAABAoGAAAfoJgkQIECAgAD7AQIECBAgEAgIcIBukgABAgQICLAfIECAAAECgYAAB+gmCRAgQICAAPsBAgQIECAQCAhwgG6SAAECBAgIsB8gQIAAAQKBgAAH6CYJECBAgIAA+wECBAgQIBAICHCAbpIAAQIECAiwHyBAgAABAoGAAAfoJgkQIECAgAD7AQIECBAgEAgIcIBukgABAgQICLAfIEC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EAgIcIBukgABAgQICLAfIECAAAECgYAAB+gmCRAgQICAAPsBAgQIECAQCAhwgG6SAAECBAgIsB8gQIAAAQKBgAAH6CYJECBAgIAA+wECBAgQIBAICHCAbpIAAQIECAiwHyBAgAABAoGAAAfoJgkQIECAgAD7AQIECBAgEAgIcIBukgABAgQICLAfIECAAAECgYAAB+gmCRAgQICAAPsBAgQIECAQCAhwgG6SAAECBAgIsB8gQIAAAQKBgAAH6CYJECBAgIAA+wECBAgQIBAICHCAbpIAAQIECAiwHyBAgAABAoGAAAfoJgkQIECAgAD7AQIECBAgEAgIcIBukgABAgQICLAfIECAAAECgYAAB+gmCRAgQICAAPsBAgQIECAQCAhwgG6SAAECBAgIsB8gQIAAAQKBgAAH6CYJECBAgIAA+wECBAgQIBAICHCAbpIAAQIECAiwHyBAgAABAoGAAAfoJgkQIECAgAD7AQIECBAgEAgIcIBukgABAgQICLAfIECAAAECgYAAB+gmCRAgQICAAPsBAgQIECAQCAhwgG6SAAECBAgIsB8gQIAAAQKBgAAH6CYJECBAgIAA+wECBAgQIBAICHCAbpIAAQIECAiwHyBAgAABAoGAAAfoJgkQIECAgAD7AQIECBAgEAgIcIBukgABAgQICLAfIECAAAECgYAAB+gmCRAgQICAAPsBAgQIECAQCAhwgG6SAAECBAgIsB8gQIAAAQKBgAAH6CYJECBAgIAA+wECBAgQIBAICHCAbpIAAQIECAiwHyBAgAABAoGAAAfoJgkQIECAgAD7AQIECBAgEAgIcIBukgABAgQICLAfIECAAAECgYAAB+gmCRAgQICAAPsBAgQIECAQCAhwgG6SAAECBAgIsB8gQIAAAQKBgAAH6CYJECBAgIAA+wECBAgQIBAICHCAbpIAAQIECAiwHyBAgAABAoGAAAfoJgkQIECAgAD7AQIECBAgEAgIcIBukgABAgQICLAfIECAAAECgYAAB+gmCRAgQICAAPsBAgQIECAQCAhwgG6SAAECBAgIsB8gQIAAAQKBgAAH6CYJECBAgIAA+wECBAgQIBAICHCAbpIAAQIECAiwHyBAgAABAoGAAAfoJgkQIECAgAD7AQIECBAgEAgIcIBukgABAgQICLAfIECAAAECgYAAB+gmCRAgQICAAPsBAgQIECAQCAhwgG6SAAECBAgIsB8gQIAAAQKBgAAH6CYJECBAgIAA+wECBAgQIBAICHCAbpIAAQIECAiwHyBAgAABAoGAAAfoJgkQIECAgAD7AQIECBAgEAgIcIBukgABAgQICLAfIECAAAECgYAAB+gmCRAgQICAAPsBAgQIECAQCAhwgG6SAAECBAgIsB8gQIAAAQKBgAAH6CYJECBAgIAA+wECBAgQIBAICHCAbpIAAQIECAiwHyBAgAABAoGAAAfoJgkQIECAgAD7AQIECBAgEAgIcIBukgABAgQICLAfIECAAAECgYAAB+gmCRAgQICAAPsBAgQIECAQCAhwgG6SAAECBAgIsB8gQIAAAQKBgAAH6CYJECBAgIAA+wECBAgQIBAICHCAbpIAAQIECAiwHyBAgAABAoGAAAfoJgkQIECAgAD7AQIECBAgEAgIcIBukgABAgQICLAfIECAAAECgYAAB+gmCRAgQICAAPsBAgQIECAQCAhwgG6SAAECBAgIsB8gQIAAAQKBgAAH6CYJECBAgIAA+wECBAgQIBAICHCAbpIAAQIECAiwHyBAgAABAoGAAAfoJgkQIECAgAD7AQIECBAgEAgIcIBukgABAgQICLAfIECAAAECgYAAB+gmCRAgQICAAPsBAgQIECAQCAhwgG6SAAECBAgIsB8gQIAAAQKBgAAH6CYJECBAgIAA+wECBAgQIBAICHCAbpIAAQIECAiwHyBAgAABAoGAAAfoJgkQIECAgAD7AQIECBAgEAgIcIBukgABAgQICLAfIECAAAECgYAAB+gmCRAgQICAAPsBAgQIECAQCAhwgG6SAAECBAgIsB8gQIAAAQKBgAAH6CYJECBAgIAA+wECBAgQIBAICHCAbpIAAQIECAiwHyBAgAABAoGAAAfoJgkQIECAgAD7AQIECBAgEAgIcIBukgABAgQICLAfIECAAAECgYAAB+gmCRAgQICAAPsBAgQIECAQCAhwgG6SAAECBAgIsB8gQIAAAQKBgAAH6CYJECBAgIAA+wECBAgQIBAICHCAbpIAAQIECAiwHyBAgAABAoGAAAfoJgkQIECAgAD7AQIECBAgEAgIcIBukgABAgQICLAfIECAAAECgYAAB+gmCRAgQICAAPsBAgQIECAQCAhwgG6SAAECBAgIsB8gQIAAAQKBgAAH6CYJECBAgIAA+wECBAgQIBAICHCAbpIAAQIECAiwHyBAgAABAoGAAAfoJgkQIECAgAD7AQIECBAgEAgIcIBukgABAgQICLAfIECAAAECgYAAB+gmCRAgQICAAPsBAgQIECAQCAhwgG6SAAECBAgIsB8gQIAAAQKBgAAH6CYJECBAgIAA+wECBAgQIBAICHCAbpIAAQIECAiwHyBAgAABAoGAAAfoJgkQIECAgAD7AQIECBAgEAgIcIBukgABAgQICLAfIECAAAECgYAAB+gmCRAgQICAAPsBAgQIECAQCAhwgG6SAAECBAgIsB8gQIAAAQKBgAAH6CYJECBAgIAA+wECBAgQIBAICHCAbpIAAQIECAiwHyBAgAABAoGAAAfoJgkQIECAgAD7AQIECBAgEAgIcIBukgABAgQICLAfIECAAAECgYAAB+gmCRAgQICAAPsBAgQIECAQCAhwgG6SAAECBAgIsB8gQIAAAQKBgAAH6CYJECBAgIAA+wECBAgQIBAICHCAbpIAAQIECAiwHyBAgAABAoGAAAfoJgkQIECAgAD7AQIECBAgEAgIcIBukgABAgQICLAfIECAAAECgYAAB+gmCRAgQICAAPsBAgQIECAQCAhwgG6SAAECBAgIsB8gQIAAAQKBgAAH6CYJECBAgIAA+wECBAgQIBAICHCAbpIAAQIECAiwHyBAgAABAoGAAAfoJgkQIECAgAD7AQIECBAgEAgIcIBukgABAgQICLAfIECAAAECgYAAB+gmCRAgQICAAPsBAgQIECAQCAhwgG6SAAECBAgIsB8gQIAAAQKBgAAH6CYJECBAgIAA+wECBAgQIBAICHCAbpIAAQIECAiwHyBAgAABAoGAAAfoJgkQIECAgAD7AQIECBAgEAgIcIBukgABAgQIHLFxAWmhEwHPAAAAAElFTkSuQmCC</pentrails><costumes><list struct="atomic" id="2"></list></costumes><sounds><list struct="atomic" id="3"></list></sounds><variables></variables><blocks></blocks><scripts></scripts><sprites><sprite name="Sprite" idx="1" x="0" y="0" heading="90" scale="1" volume="100" pan="0" rotation="1" draggable="true" costume="0" color="80,80,80,1" pen="tip" id="8"><costumes><list struct="atomic" id="9"></list></costumes><sounds><list struct="atomic" id="10"></list></sounds><blocks></blocks><variables></variables><scripts><comment x="20" y="10" w="188" collapsed="false">What you can do with it!.</comment><script x="20" y="64"><block s="receiveGo"></block><custom-block s="ask %txt and wait %upvar"><l>What&apos;s your name?</l><l>answer</l></custom-block><block s="doSayFor"><block s="reportJoinWords"><list><l>Hello </l><block var="answer"/></list></block><l>2</l></block><block s="gotoXY"><l>0</l><l>0</l></block><custom-block s="if (ask %txt ) %cs else %cs"><l>Hello, would you like to see the turtle move?</l><script><custom-block s="alert %txt"><l>Ok</l></custom-block><block s="forward"><custom-block s="ask for input %s"><l>How many steps?</l></custom-block></block></script><script><custom-block s="alert %txt"><l>Ok</l></custom-block></script></custom-block></script><comment x="20" y="303.4999999999998" w="186" collapsed="false">Look at these new blocks!</comment><script x="20" y="357.4999999999998"><custom-block s="ask for input %s"><l>What&apos;s your name?</l></custom-block></script><script x="20" y="390.4999999999998"><custom-block s="ask %s"><l>Are you sure?</l></custom-block></script><script x="20" y="423.4999999999998"><custom-block s="if (ask %txt ) %cs else %cs"><l>Are you sure?</l><script></script><script></script></custom-block></script><script x="20" y="508.3333333333333"><custom-block s="alert %txt"><l>Hello, World!</l></custom-block></script><script x="20" y="547.3333333333334"><custom-block s="ask %txt and wait %upvar"><l>What&apos;s your name?</l><l>answer</l></custom-block></script></scripts></sprite></sprites></stage><hidden></hidden><headers></headers><code></code><blocks><block-definition s="alert %&apos;str&apos;" type="command" category="control"><header></header><code></code><translations></translations><inputs><input type="%txt">Hello, World!</input></inputs><script><block s="doRun"><block s="reportJSFunction"><list><l>popup</l></list><l>window.alert(popup);</l></block><list><block var="str"/></list></block></script></block-definition><block-definition s="ask for input %&apos;str&apos;" type="reporter" category="control"><header>&#xD;</header><code></code><translations></translations><inputs><input type="%s">What&apos;s your name?</input></inputs><script><block s="doReport"><block s="evaluate"><block s="reportJSFunction"><list><l>a</l></list><l>return window.prompt(a);</l></block><list><block var="str"/></list></block></block></script></block-definition><block-definition s="ask %&apos;str&apos;" type="predicate" category="control"><header></header><code></code><translations></translations><inputs><input type="%s">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="str"/></list></block></block></script></block-definition><block-definition s="if (ask %&apos;Text&apos; ) %&apos;code1&apos; else %&apos;code2&apos;" type="command" category="control"><header></header><code></code><translations></translations><inputs><input type="%txt">Are you sure?</input><input type="%cs"></input><input type="%cs"></input></inputs><script><block s="doIfElse"><custom-block s="ask %s"><block var="Text"/></custom-block><script><block s="doRun"><block var="code1"/><list></list></block></script><script><block s="doRun"><block var="code2"/><list></list></block></script></block></script></block-definition><block-definition s="ask %&apos;Text&apos; and wait %&apos;answer&apos;" type="command" category="control"><header></header><code></code><translations></translations><inputs><input type="%txt">What&apos;s your name?</input><input type="%upvar"></input></inputs><script><block s="doSetVar"><l>answer</l><custom-block s="ask for input %s"><block var="Text"/></custom-block></block></script></block-definition></blocks><variables></variables></project>

What's the difference?

Thank you for trying it out, and go ahead, you can use it officially.

Sorry if you been mislead, that would be cool though.

Oh, do you know a windows error box, and then this one is a alert in the browser

Yes.

What happened to the download?

all of the pages you linked are 404's


if you cant read the pictures, click to get it to fullscreen

i think thats only in ie with browser alert stuff

nope its not

Just a note if you are reading this.
JSnap has been taken down as the owner’s GitHub account has been deleted.
@sputnik also for some reason said to me that he’ll put a link in here to show you guys.


But I recommend checking out SnapV as it is like JSnap.

The long gone missing legend Sputnik remains unknown where he is today.