This is a read-only archive of the old Scratch 1.x Forums.
Try searching the current Scratch discussion forums.

#1 2011-05-23 09:20:39

scratch_yoshi
Scratcher
Registered: 2009-06-12
Posts: 1000+

Javascript

Here's a cool trick you can do with Javascript:
1. copy:
javascript:insert_text('text', '');
2. Click a text box
3. Replce "'text'" with anything you want to type.
4. ???????
5. PROFIT!!
6. Discuss Javascript and cool tricks you can do with it.

Last edited by scratch_yoshi (2011-05-23 09:20:54)


Retired from Scratch, but just the language itself. Not the forums.

Offline

 

#2 2011-05-23 09:31:10

meew0
Scratcher
Registered: 2010-02-22
Posts: 1000+

Re: Javascript

Hm... this reminds me of the old "<insert programming language here> discussion" thread fad.

You can use

Code:

alert("insert a text here")

to fool people (YOU CLICKED THIS BUTTON. THE WORLD WILL END IN 10... 9... 8...)

Last edited by meew0 (2011-05-23 09:31:42)


http://i.imgur.com/mJV3j.pnghttp://i.imgur.com/HwWAX.pnghttp://i.imgur.com/sZ7Ui.pnghttp://i.imgur.com/0y6yh.pnghttp://i.imgur.com/nOC4l.png

Offline

 

#3 2011-05-23 09:35:10

scratch_yoshi
Scratcher
Registered: 2009-06-12
Posts: 1000+

Re: Javascript

Hah, that's funny. javascript:alert("WTHack DID YOU DO YOU DESTROYED THE WORLD AND PORTAL 2!!!")

Last edited by scratch_yoshi (2011-05-23 09:35:27)


Retired from Scratch, but just the language itself. Not the forums.

Offline

 

#4 2011-05-23 12:27:19

rdococ
Scratcher
Registered: 2009-10-11
Posts: 1000+

Re: Javascript

Funny!!

Here's mine:

alert("Hey, you found this because you are Namco. Because you are, I will turn you into a zombie and own Pacman. Bye, little nasty boy!");
^ Very hilarious for Namco haters.

Offline

 

#5 2011-05-23 12:50:31

TheSuccessor
Scratcher
Registered: 2010-04-23
Posts: 1000+

Re: Javascript

Here's mine:

Code:

javascript:var w=function(a){document.write(a);};var x=function(i){if(i<=0xf)return('0'+i.toString(16));return(i.toString(16));};for(var r=0;r<=0xff;r+=0xf){for(var g=0;g<=0xff;g+=0xf){for(var b=0;b<=0xff;b+=0x5){w('<font color="#'+x(r)+x(g)+x(b)+'">█</font>');}w('<br />');}}

/* No comment */

Offline

 

Board footer