<snapdata remixID="8272312"><project name="JS blocks" app="Snap! 5.1, http://snap.berkeley.edu" version="1"><notes>Just some handy JS browser functions.&#xD;Feel free to use with or without attribution.&#xD;&#xD;NEW: Website popup, cursor change, and notification images!</notes><thumbnail>data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAKAAAAB4CAYAAAB1ovlvAAADOUlEQVR4Xu3XQUpjYRCF0V+J4MQtuJ9sQNCBGnAnbsdNuB7JJJMQHKQbZz2waS6XLpDzxqkqct4HIRfn38/yEBgSuBDgkLyzXwICFMKogABH+R0XoAZGBQQ4yu+4ADUwKiDAUX7HBaiBUQEBjvI7LkANjAoIcJTfcQFqYFRAgKP8jgtQA6MCAhzld1yAGhgVEOAov+MC1MCogABH+R0XoAZGBQQ4yu+4ADUwKiDAUX7HBaiBUQEBjvI7LkANjAoIcJTfcQFqYFRAgKP8jgtQA6MCAhzld1yAGhgVEOAov+MC1MCogABH+R0XoAZGBQQ4yu+4ADUwKiDAUX7HBaiBUQEBjvI7LkANjAoIcJTfcQFqYFRAgKP8jgtQA6MCAhzld1yAGhgVEOAov+MC1MCogABH+R0XoAZGBQQ4yu+4ADUwKiDAUX7HBaiBUQEBfsP/9va29vv92m636/b2dvQl/eTjAvzm7R4Oh/Xy8rI+Pz/Xx8fHur+/X5vNZj09Pa3r6+uf3MR//W4C/Av3+/v7en19XTc3N3986ng8rufn53U+n7/C9OQCAgwCPJ1O6/HxcV1eXq67u7tc3+QS4D/+BD88PHz9BO92u3V1dSWdkoAA/QkppZStEWDmZqokIMASpDWZgAAzN1MlAQGWIK3JBASYuZkqCQiwBGlNJiDAzM1USUCAJUhrMgEBZm6mSgICLEFakwkIMHMzVRIQYAnSmkxAgJmbqZKAAEuQ1mQCAszcTJUEBFiCtCYTEGDmZqokIMASpDWZgAAzN1MlAQGWIK3JBASYuZkqCQiwBGlNJiDAzM1USUCAJUhrMgEBZm6mSgICLEFakwkIMHMzVRIQYAnSmkxAgJmbqZKAAEuQ1mQCAszcTJUEBFiCtCYTEGDmZqokIMASpDWZgAAzN1MlAQGWIK3JBASYuZkqCQiwBGlNJiDAzM1USUCAJUhrMgEBZm6mSgICLEFakwkIMHMzVRIQYAnSmkxAgJmbqZKAAEuQ1mQCAszcTJUEBFiCtCYTEGDmZqokIMASpDWZgAAzN1MlAQGWIK3JBASYuZkqCQiwBGlNJiDAzM1USUCAJUhrMgEBZm6mSgK/AE38F7eEtLd9AAAAAElFTkSuQmCC</thumbnail><stage name="Stage" width="480" height="360" costume="0" color="255,255,255,1" tempo="60" threadsafe="false" volume="100" pan="0" lines="round" ternary="false" codify="false" inheritance="true" sublistIDs="false" scheduled="false" id="1"><pentrails>data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAeAAAAFoCAYAAACPNyggAAAOhUlEQVR4Xu3VwQkAAAjEMN1/abewn7jAQRC64wgQIECAAIF3gX1fNEiAAAECBAiMAHsCAgQIECAQCAhwgG6SAAECBAgIsB8gQIAAAQKBgAAH6CYJECBAgIAA+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+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><script x="221" y="65"><custom-block s="Open website %s"><l>https://www.google.com</l></custom-block></script><script x="221" y="111"><custom-block s="Alert %s"><l></l></custom-block></script><script x="221" y="163"><custom-block s="Notification title %s text %txt icon link %s image link %s"><l></l><l></l><l></l><l></l></custom-block></script><script x="221" y="212"><custom-block s="Confirm popup %s"><l></l></custom-block></script><script x="222" y="254"><custom-block s="Prompt %s default %s"><l></l><l></l></custom-block></script><script x="223" y="298"><custom-block s="popup %s"><l>Text</l></custom-block></script><script x="225" y="351"><custom-block s="set cookie var %s to %s will expire in %n days"><l></l><l></l><l></l></custom-block></script><script x="226" y="397"><custom-block s="get cookie var %s"><l></l></custom-block></script><script x="224" y="443"><custom-block s="File save prompt . name: %s text %s extension: %s (plain, html, png, sb2, xml, rtf)"><l></l><l></l><l></l></custom-block></script><script x="226" y="511"><custom-block s="set cursor %txt"><l></l></custom-block></script><script x="228" y="561"><custom-block s="return cursor"></custom-block></script><script x="227" y="615"><custom-block s="website popup %s"><l>https://www.google.com</l></custom-block></script><script x="225" y="669"><custom-block s="anywhere url %s"><l>https://en.wikipedia.org/wiki/Main_page</l></custom-block></script></scripts></sprite></sprites></stage><hidden></hidden><headers></headers><code></code><blocks><block-definition s="Open website %&apos;website&apos;" type="command" category="other"><comment x="0" y="0" w="90" collapsed="false">Opens a website in a new tab or window. Make sure it starts with https:// or http://</comment><header></header><code></code><translations></translations><inputs><input type="%s">https://www.google.com</input></inputs><script><block s="doRun"><block s="reportJSFunction"><list><l>openWebAddress</l></list><l>window.open(openWebAddress);</l></block><list><block var="website"/></list></block></script></block-definition><block-definition s="Alert %&apos;alert text&apos;" type="command" category="other"><comment x="0" y="0" w="90" collapsed="false">Popup with text.</comment><header></header><code></code><translations></translations><inputs><input type="%s"></input></inputs><script><block s="doRun"><block s="reportJSFunction"><list><l>alertNameText</l></list><l>alert(alertNameText);</l></block><list><block var="alert text"/></list></block></script></block-definition><block-definition s="Notification title %&apos;title&apos; text %&apos;text&apos; icon link %&apos;icon&apos; image link %&apos;image&apos;" type="command" category="other"><comment x="0" y="0" w="90" collapsed="false">Creates a desktop notification. Any or all of the inputs can be filled.&#xD;NB: Will ask user for permission first.</comment><header></header><code></code><translations></translations><inputs><input type="%s"></input><input type="%txt"></input><input type="%s"></input><input type="%s"></input></inputs><script><block s="doRun"><block s="reportJSFunction"><list><l>notificationTitle</l><l>notificationText</l><l>iconLink</l><l>imageLink</l></list><l>// Check if the browser supports notifications&#xD;  if (!("Notification" in window)) {}&#xD;  else if (Notification.permission === "granted") {&#xD;    var notification = new Notification(notificationTitle, {body:notificationText, icon:iconLink, image:imageLink});&#xD;  }&#xD;  else if (Notification.permission !== "denied") {&#xD;    Notification.requestPermission().then(function (permission) {&#xD;    if (permission === "granted") {&#xD;        var notification = new Notification(notificationText);&#xD;      }&#xD;    });&#xD;  }</l></block><list><block var="title"/><block var="text"/><block var="icon"/><block var="image"/></list></block></script></block-definition><block-definition s="Confirm popup %&apos;text&apos;" type="predicate" category="other"><comment x="0" y="0" w="90" collapsed="false">Popup with &apos;Ok&apos; or &apos;Cancel&apos;</comment><header></header><code></code><translations></translations><inputs><input type="%s"></input></inputs><script><block s="doReport"><block s="evaluate"><block s="reportJSFunction"><list><l>confirmText</l></list><l>return(confirm(confirmText));</l></block><list><block var="text"/></list></block></block></script></block-definition><block-definition s="Prompt %&apos;text&apos; default %&apos;default text&apos;" type="reporter" category="other"><comment x="0" y="0" w="90" collapsed="false">Popup with an input.</comment><header></header><code></code><translations></translations><inputs><input type="%s"></input><input type="%s"></input></inputs><script><block s="doReport"><block s="evaluate"><block s="reportJSFunction"><list><l>promptText</l><l>promptDefault</l></list><l>return(prompt(promptText, promptDefault));</l></block><list><block var="text"/><block var="default text"/></list></block></block></script></block-definition><block-definition s="popup %&apos;text&apos;" type="command" category="other"><comment x="0" y="0" w="90" collapsed="false">Creates a new window with text in.</comment><header></header><code></code><translations></translations><inputs><input type="%s">Text</input></inputs><script><block s="doRun"><block s="reportJSFunction"><list><l>javaText</l></list><l>let newWindow = window.open("about:blank", "", "_blank"); let textBlock = javaTextif (newWindow) {	newWindow.document.write(textBlock);}</l></block><list><block var="text"/></list></block></script></block-definition><block-definition s="set cookie var %&apos;cname&apos; to %&apos;cvalue&apos; will expire in %&apos;exdays&apos; days" type="command" category="other"><comment x="0" y="0" w="90" collapsed="false">Creates a browser cookie with the value, title, and expire date.</comment><header></header><code></code><translations></translations><inputs><input type="%s"></input><input type="%s"></input><input type="%n"></input></inputs><script><block s="doRun"><block s="reportJSFunction"><list><l>cname</l><l>exdays</l><l>cvalue</l></list><l>var d = new Date();  d.setTime(d.getTime() + (exdays*24*60*60*1000));  var expires = "expires="+ d.toUTCString();  document.cookie = cname + "=" + cvalue + ";" + expires + ";path=/";</l></block><list><block var="cname"/><block var="exdays"/><block var="cvalue"/></list></block></script></block-definition><block-definition s="get cookie var %&apos;cname&apos;" type="reporter" category="other"><comment x="0" y="0" w="90" collapsed="false">Returns the value of the specified cookie.</comment><header></header><code></code><translations></translations><inputs><input type="%s"></input></inputs><script><block s="doReport"><block s="evaluate"><block s="reportJSFunction"><list><l>cname</l></list><l>var name = cname + "=";  var decodedCookie = decodeURIComponent(document.cookie);  var ca = decodedCookie.split(&apos;;&apos;);  for(var i = 0; i &lt;ca.length; i++) {    var c = ca[i];    while (c.charAt(0) == &apos; &apos;) {      c = c.substring(1);    }    if (c.indexOf(name) == 0) {      return c.substring(name.length, c.length);    }  }return ca;</l></block><list><block var="cname"/></list></block></block></script></block-definition><block-definition s="File save prompt . name: %&apos;file name&apos; text %&apos;file text&apos; extension: %&apos;file extension&apos; (plain, html, png, sb2, xml, rtf)" type="command" category="other"><header></header><code></code><translations></translations><inputs><input type="%s"></input><input type="%s"></input><input type="%s"></input></inputs><script><block s="doIf"><block s="reportOr"><block s="reportOr"><block s="reportEquals"><block var="file extension"/><l>xml</l></block><block s="reportEquals"><block var="file extension"/><l>rtf</l></block></block><block s="reportOr"><block s="reportOr"><block s="reportEquals"><block var="file extension"/><l>png</l></block><block s="reportEquals"><block var="file extension"/><l>sb2</l></block></block><block s="reportOr"><block s="reportEquals"><block var="file extension"/><l>plain</l></block><block s="reportEquals"><block var="file extension"/><l>html</l></block></block></block></block><script><block s="doIf"><block s="reportEquals"><block var="file extension"/><l>plain</l></block><script><block s="doRun"><block s="reportJSFunction"><list><l>textContents</l><l>textName</l></list><l>var ide=this.parentThatIsA(IDE_Morph);ide.saveFileAs(textContents,&apos;text/plain;charset=utf-8&apos;, textName);</l></block><list><block var="file text"/><block var="file name"/></list></block></script></block><block s="doIf"><block s="reportEquals"><block var="file extension"/><l>png</l></block><script><block s="doRun"><block s="reportJSFunction"><list><l>textContents</l><l>textName</l></list><l>var ide=this.parentThatIsA(IDE_Morph);ide.saveFileAs(textContents,&apos;text/png;charset=utf-8&apos;, textName);</l></block><list><block var="file text"/><block var="file name"/></list></block></script></block><block s="doIf"><block s="reportEquals"><block var="file extension"/><l>sb2</l></block><script><block s="doRun"><block s="reportJSFunction"><list><l>textContents</l><l>textName</l></list><l>var ide=this.parentThatIsA(IDE_Morph);ide.saveFileAs(textContents,&apos;text/sb2;charset=utf-8&apos;, textName);</l></block><list><block var="file text"/><block var="file name"/></list></block></script></block><block s="doIf"><block s="reportEquals"><block var="file extension"/><l>xml</l></block><script><block s="doRun"><block s="reportJSFunction"><list><l>textContents</l><l>textName</l></list><l>var ide=this.parentThatIsA(IDE_Morph);ide.saveFileAs(textContents,&apos;text/xml;charset=utf-8&apos;, textName);</l></block><list><block var="file text"/><block var="file name"/></list></block></script></block><block s="doIf"><block s="reportEquals"><block var="file extension"/><l>rtf</l></block><script><block s="doRun"><block s="reportJSFunction"><list><l>textContents</l><l>textName</l></list><l>var ide=this.parentThatIsA(IDE_Morph);ide.saveFileAs(textContents,&apos;text/rtf;charset=utf-8&apos;, textName);</l></block><list><block var="file text"/><block var="file name"/></list></block></script></block><block s="doIf"><block s="reportEquals"><block var="file extension"/><l>html</l></block><script><block s="doRun"><block s="reportJSFunction"><list><l>textContents</l><l>textName</l></list><l>var ide=this.parentThatIsA(IDE_Morph);ide.saveFileAs(textContents,&apos;text/html;charset=utf-8&apos;, textName);</l></block><list><block var="file text"/><block var="file name"/></list></block></script></block></script></block></script></block-definition><block-definition s="set cursor %&apos;cursor name&apos;" type="command" category="other"><comment w="261" collapsed="false">Sets cursor to a specific image. See https://www.w3schools.com/CSSref/playit.asp?filename=playcss_cursor&amp;preval=alias for a list of keywords</comment><header></header><code></code><translations></translations><inputs><input type="%txt"></input></inputs><script><block s="doRun"><block s="reportJSFunction"><list><l>cursorName</l></list><l>document.body.style.cursor = cursorName;</l></block><list><block var="cursor name"/></list></block></script></block-definition><block-definition s="return cursor" type="command" category="other"><comment x="0" y="0" w="90" collapsed="false">&quot;Help! I don&apos;t know how to change the cursor back!&quot;</comment><header></header><code></code><translations></translations><inputs></inputs><script><custom-block s="set cursor %txt"><l>default</l></custom-block></script></block-definition><block-definition s="website popup %&apos;website&apos;" type="command" category="other"><comment x="0" y="0" w="114" collapsed="false">Opens a new window with a website.</comment><header></header><code></code><translations></translations><inputs><input type="%s">https://www.google.com</input></inputs><script><block s="doRun"><block s="reportJSFunction"><list><l>javaWebsite</l></list><l>let newWindow = window.open(javaWebsite, "", "_blank");</l></block><list><block var="website"/></list></block></script></block-definition><block-definition s="anywhere url %&apos;url&apos;" type="reporter" category="other"><comment x="0" y="0" w="90" collapsed="false">Get html contents from anywhere on the internet.</comment><header></header><code></code><translations></translations><inputs><input type="%s">https://en.wikipedia.org/wiki/Main_page</input></inputs><script><block s="doReport"><block s="reportURL"><block s="reportJoinWords"><list><l>https://cors-anywhere.herokuapp.com/</l><block var="url"/></list></block></block></block></script></block-definition></blocks><variables></variables></project><media name="JS blocks" app="Snap! 5.1, http://snap.berkeley.edu" version="1"></media></snapdata>