So, I found this silly javascript code...

Things that don't belong anywhere else. (Check first).

Moderators: Moderators General, Prelates, Magistrates

User avatar
alexriehl
Posts: 127
Joined: Wed Sep 22, 2010 1:19 am UTC
Location: Auburn, AL
Contact:

So, I found this silly javascript code...

Postby alexriehl » Thu Apr 21, 2011 3:42 pm UTC

Well, I was browsing the minecraft forums when I came across a pretty strange little bit of code. Basically, when entered into a web browser's adress bar (instead of the web adress; you basically just paste it in, but don't keep what was there before), it pops up a little triangular Asteroids-style spacecraft in the top-right corner of the page, and a score-box in the bottom right. Controls are WASD/arrow keys to move, and spacebar to fire. Basically, you zoom about the page, and as you fire, you "blow up" stuff on the page. When you press the Esc key, the spaceship and scorepad disappear, letting you use the webpage as normal. If you fly out the right, you come out the left, just like in Asteroids. If you fly out the bottom on a page that scrolls, it does an automatic Page Down. Good for blowing up ads.

Well, here it is:

Code: Select all

javascript:var s=document.createElement('script');s.type='text/javascript';document.body.appendChild(s);s.src='http://erkie.github.com/asteroids.min.js';void(0)


Really all on one line. Hope you people enjoy it!
AMA about suitcases
Spoiler:
Image

joeframbach
Posts: 1478
Joined: Sun Nov 05, 2006 12:49 am UTC

Re: So, I found this silly javascript code...

Postby joeframbach » Thu Apr 21, 2011 3:46 pm UTC


User avatar
Cathy
Posts: 850
Joined: Sun Dec 27, 2009 5:31 am UTC
Location: TX, USA

Re: So, I found this silly javascript code...

Postby Cathy » Thu Apr 21, 2011 4:00 pm UTC

^^ above link game me an "Internal Server Error" o.O
Amie wrote:Cathy, I now declare you to be an awesome person, by the powers vested in me by nobody, really.
yurell wrote:We need fewer homoeopaths, that way they'll be more potent!

User avatar
alexriehl
Posts: 127
Joined: Wed Sep 22, 2010 1:19 am UTC
Location: Auburn, AL
Contact:

Re: So, I found this silly javascript code...

Postby alexriehl » Thu Apr 21, 2011 10:48 pm UTC

Cathy wrote:^^ above link game me an "Internal Server Error" o.O

Huh, that's weird.
AMA about suitcases
Spoiler:
Image

User avatar
Cathy
Posts: 850
Joined: Sun Dec 27, 2009 5:31 am UTC
Location: TX, USA

Re: So, I found this silly javascript code...

Postby Cathy » Thu Apr 21, 2011 11:33 pm UTC

Oh hey look it works now! :D
Amie wrote:Cathy, I now declare you to be an awesome person, by the powers vested in me by nobody, really.
yurell wrote:We need fewer homoeopaths, that way they'll be more potent!

User avatar
alexriehl
Posts: 127
Joined: Wed Sep 22, 2010 1:19 am UTC
Location: Auburn, AL
Contact:

Re: So, I found this silly javascript code...

Postby alexriehl » Thu Apr 21, 2011 11:36 pm UTC

Cathy wrote:Oh hey look it works now! :D

Maybe his bandwidth renewed or something.
AMA about suitcases
Spoiler:
Image

User avatar
SurgicalSteel
Posts: 1926
Joined: Tue Jan 19, 2010 4:18 pm UTC
Location: DMV, USA

Re: So, I found this silly javascript code...

Postby SurgicalSteel » Fri Apr 22, 2011 5:37 am UTC

That's pretty awesome. I'm sure I have five kinds of viruses on my computer now but I don't care. Also, though, it's not just one line of code. The one line of code points to a js file that is probably a good deal more than one line of code.
"There's spray paint on the teleprompter
Anchorman screams that he's seen a monster (mayday)
There's blood stains on his shirt (mayday)
They say that he's gone berserk."
--Flobots "Mayday"

User avatar
alexriehl
Posts: 127
Joined: Wed Sep 22, 2010 1:19 am UTC
Location: Auburn, AL
Contact:

Re: So, I found this silly javascript code...

Postby alexriehl » Fri Apr 22, 2011 8:51 pm UTC

SurgicalSteel wrote:That's pretty awesome. I'm sure I have five kinds of viruses on my computer now but I don't care. Also, though, it's not just one line of code. The one line of code points to a js file that is probably a good deal more than one line of code.

True dat.
AMA about suitcases
Spoiler:
Image

mmark9094
Posts: 165
Joined: Thu Oct 14, 2010 12:24 am UTC

Re: So, I found this silly javascript code...

Postby mmark9094 » Fri Apr 22, 2011 9:05 pm UTC

Related script:

Code: Select all

javascript:var%20i,s,ss=['http://kathack.com/js/kh.js','http://ajax.googleapis.com/ajax/libs/jquery/1.5.1/jquery.min.js'];for(i=0;i!=ss.length;i++){s=document.createElement('script');s.src=ss[i];document.body.appendChild(s);}void(0);

User avatar
alexriehl
Posts: 127
Joined: Wed Sep 22, 2010 1:19 am UTC
Location: Auburn, AL
Contact:

Re: So, I found this silly javascript code...

Postby alexriehl » Fri Apr 22, 2011 9:11 pm UTC

mmark9094 wrote:Related script:

Code: Select all

javascript:var%20i,s,ss=['http://kathack.com/js/kh.js','http://ajax.googleapis.com/ajax/libs/jquery/1.5.1/jquery.min.js'];for(i=0;i!=ss.length;i++){s=document.createElement('script');s.src=ss[i];document.body.appendChild(s);}void(0);

Katamari. Nice. Bit laggy, though.
AMA about suitcases
Spoiler:
Image

User avatar
Aaeriele
Posts: 2127
Joined: Tue Feb 23, 2010 3:30 am UTC
Location: San Francisco, CA

Re: So, I found this silly javascript code...

Postby Aaeriele » Fri Apr 22, 2011 9:59 pm UTC

alexriehl wrote:Katamari. Nice. Bit laggy, though.


Runs a lot nicer in Chrome than FF.
Vaniver wrote:Harvard is a hedge fund that runs the most prestigious dating agency in the world, and incidentally employs famous scientists to do research.

afuzzyduck wrote:ITS MEANT TO BE FLUTTERSHY BUT I JUST SEE AAERIELE! CURSE YOU FORA!


Return to “General”

Who is online

Users browsing this forum: Coyne and 45 guests