8 ms·
Asteroids JavaScript Bookmarklet to blow up any web site
- makeramen 16y agowhat an awesome stress reliever. now i can get points for destroying facebook.
- crux_ 16y agoProtip for the paranoid: the author could nab your session cookie at the same time, too! :)
- uxp 16y agoCould, but doesn't: http://github.com/erkie/erkie.github.com/blob/master/asteroids.js http://github.com/erkie/erkie.github.com/blob/master/asteroi... Though, it appears he was trying to implement high scores, which would send some information to another site, including document.location.href, but it is commented out in the version I linked, and removed in the minified version.
- crux_ 16y ago> Could, but doesn't Could, but doesn't yet. If you're not locally rehosting the 'known-good' version that you just audited, you're not being paranoid enough.
- Groxx 16y agoIf you're on the internet, you're not being paranoid enough. Though that's a good reminder :) Thanks for pointing it out!
- ck2 16y agoUse HttpOnly on critical cookies!
- crux_ 16y agoOkay, sure. :) A new protip for the paranoid: the author could phish the snot out of you with an overlay that made it look like Facebook needed a re-login, too!
- ck2 16y agoUse Secure Login for Firefox! https://addons.mozilla.org/firefox/addon/4429 https://addons.mozilla.org/firefox/addon/4429 (lol, seriously though, it highlights "real" login fields based on domain for the page/frame which can't be spoofed and does a one-click login rather than typing it in - you can't get "fooled" because you should never be typing anything)
- follower 16y agoHeh, yeah, when I saw it earlier I wondered how successfully people could use an approach like this to social engineer people in such a manner. Glad I'm not the only paranoid one. :)
- mshafrir 16y agoAwesome. Doesn't seem to work on Gmail.
- pohl 16y agoInteresting. It worked great on google reader. On Gmail I can sometimes get to the point where I can thrust & fire, but as soon as I destroy anything the gmail client seems to reset itself.
- SanjayUttam 16y agoInteresting, it does work on the "basic HTML" version of Gmail. For me it seems like the "keyboard shortcut" functionality gets in the way of controller the "ship"
- folz 16y agoThis is absolutely brilliant.
- benmills 16y agoIt would be awesome to add some js to a website you own to spawn a computer controlled defender if someone uses this script on your site.
- bl4k 16y agoI wrote a defense: http://github.com/bl4k/astroid-defense http://github.com/bl4k/astroid-defense (bit scrappy, 10 min of code, but funny) (test it by running asteroids on this page: http://bl4k.github.com/ http://bl4k.github.com/)
- joe-mccann 16y agoha nice one, but astley video is blocked.
- chewbranca 16y agoThank god chrome lets me disable future alert messages...
- acgourley 16y agoNot only great, in a few situations it's a useful and fun way to 'cross off' content on a site you don't need to see anymore. Like stories you wish were not on hacker news.
- mahmud 16y agoHow did I live for so long without this?
- al_james 16y agoAwesome. Now someone needs to combine it with websockets/node.js (or similar) so I can see the other players on the same page!
- rudyfink 16y agoIt'd definitely put a new bent on up or down voting comments. I'm using it to blow away the comments.
- b0b0b0b 16y agocollaborative ad filtering
- Cushman 16y agoExactly what you wanted: http://realitymachine.net/asteroids.html http://realitymachine.net/asteroids.html And the HN article, if you want to drum up some more players: http://news.ycombinator.com/item?id=1738543 http://news.ycombinator.com/item?id=1738543 I hacked together a very (very) basic multiplayer with a paper-thin node.js server in coffeescript. Yes, really: http://github.com/cushman/asteroids.js http://github.com/cushman/asteroids.js It might deserve a newspost of its own, but I'd like to have a working server running so people can actually, you know, use it. Unfortunately, I haven't thought to get node running on my VPS before now, and it's almost 02:00 here...
- plainOldText 16y ago"Perfection is achieved, not when there is nothing more to add, but when there is nothing left to take away." - Antoine de Saint Exupery. I think these Asteroids are a fun to use, web design tool to cut out what is not necessary. :))
- stevefink 16y agoThis is one of the most creative time sinks I've ran across in a while, had to link it here.
- cloug 16y agouse the bookmarklet mutliple times on the same page if you like armageddon-style destruction
- twism 16y agoThe TDs didn't last long.
- zalew 16y agoThe best bookmarklet I've had since Readability!
- lem72 16y agoFacebook profile pages are pretty fun to destroy.
- j3kuntz 16y agoThis is one of those creations which seems so obvious after it has been made. Good Job!
- shaddi 16y agoFinally, Farmville can get what it has coming to it.
- f1gm3nt 16y agoBest used on clients web sites =)
- dzlobin 16y agoThis + the AutoPager extension for Chrome = infinite game
- pilom 16y agoI wish I could give this comment more points. It's a blast!
- julian37 16y agoReminds me of Quelsolaar's excellent toolkit for his LOVE game: http://www.quelsolaar.com/love/tool_video.html http://www.quelsolaar.com/love/tool_video.html It also has Asteroids integrated in a similar way, as shown at around 70% into the video (unfortunately the video doesn't have a timecode, but it's worth watching in its entirety anyway.)
- wicknicks 16y agoSimply ingenious :) Loved the idea!
- rhythmAddict 16y agoThis guy better get a job offer from Chad Hurley. Seriously though...genius idea.
- avgarrison 16y agoThis is awesome! Too bad I'm the only one in the office at the moment...I guess I'll just go blow up Stackoverflow until somebody comes back.
- avgarrison 16y agoNow, this is an ad-blocker with style.
- flatulent1 16y agoNow to see something like this work with a net-enabled 3D television.
- Shtirlic 16y agoHm, thinking about writing defence script to my sites and start js-war.
- tectonic 16y agoSurround important elements with DOM shielding...
- eli 16y agoHoly crap, I had an extremely similar idea last month for a bookmarklet that let you machine gun and blow up pages. In fact, it's sitting half complete in a projects folder. Erkie, get out of my head!!!! At least it's open source, so I guess I can fork it and add in my ideas.
- joepestro 16y agoSame here! Except instead of blowing up the page, you shoot at links to follow them. Also, fog that is revealed as you move around, minimap, etc. Maybe this can spark some more ideas? http://tanksurfing.appspot.com/ http://tanksurfing.appspot.com/
- krosaen 16y agoideas are cheap :)
- nzmsv 16y agoDon't feel bad - this idea is pretty old. A program called "Desktop Toys" from the Win95 era comes to mind, and there are probably more examples.
- eli 16y agoActually, my memory of Desktop Toys is what was basing it on :) I didn't realize it was that popular.
- jhuckestein 16y agoIt's oddly non-deterministic. Add two ships and fly around a bit. They're paths will quickly diverge.
- aperiodic 16y agoIt's not that it's non-deterministic, it's just that, since your javascript interpreter doesn't execute each instance and its event handlers in parallel, each instance will receive slightly different inputs. This is because the number of times each instance's main loop fires before its keyup/down handler gets called will vary. If you load up, say, 6 instances, hold the up button for a while to get them up to full speed, then turn for 4 or 5 seconds and let go, they'll be a bit divergent, but not too badly. They should all be going roughly the same direction, and wrapping around at roughly the same time. If you load up 6 instances again, hold the up button for a while, and then turn back and forth very rapidly for a short period of time, they'll be much more divergent.
- martinp 16y agoThis should be integrated in Adblock. Adding filters by blasting the ads you don't like actually sounds fun.
- joshhart 16y agoDoes anyone want to explain how this works? I had no idea dragging onto a tab could start up javascript on a page. It's amazing!
- philfreo 16y agoWhat you're talking about has been around forever, and is called a "bookmarklet" http://en.wikipedia.org/wiki/Bookmarklet http://en.wikipedia.org/wiki/Bookmarklet
- allenp 16y agoHere is an example that will search hacker news (via google). This is based on the wikipedia example: javascript:function se(d) {return d.selection ? d.selection.createRange().text : d.getSelection()} s = se(document); for (i=0; i<frames.length && !s; i++) s = se(frames[i].document); if (!s || s=='') s = prompt('Enter%20search%20terms%20for%20HackerNews',''); var goo = 'http:'; var g = '//'; var le = 'www.google.com/'; open(goo + g + le + (s ? '#q=site%3Anews.ycombinator.com ' + encodeURIComponent(s) : '')).focus();
- msbarnett 16y agoFun, and it doubles as an easy way to spot table layouts.
- lallouz 16y agoSpot....and kill them
- pjy04 16y agothis wins 2010's most innovative app ever
- tectonic 16y agoSomeone should add touch events so it works on iPad / iPhone.
- tibbon 16y agoNot a bad idea. Trying to think through them. I might mess with this today. Too bad you couldn't get the entire page to tilt/rotate, or you could use the motion sensor too.
- deleted 16y ago[deleted]
- jackowayed 16y agoThe HN homepage is very reliant on everything being there. One shot to a number did this: http://skitch.com/jackowayed/d29n5/hn-ass-kicked http://skitch.com/jackowayed/d29n5/hn-ass-kicked
- robin_reala 16y agoTables for layout will do that.
- rodh257 16y agoAnother disadvantage to tables for layout, they are weak against attack!
- onedgepr 16y agoNice! Maybe it can be hooked up to a gmail or facebook stream to literally "destroy" spam or unwanted messages... email cleanliness could be a few laser shots away :-)
- ck2 16y agoIt's even more fun if you load several copies - they are choreographed!
- kunjaan 16y agoLet's have a leader board for every site with Points accumulated/second. "Kunjan Killed this site with a score of 1700". Are headings and hidden fields worth more points?
- krosaen 16y agoso many container divs on twitter to blow through!
- a904guy 16y agoI'm surprised no one has commented on the security issue about the bookmarklet allowing javascript to be placed/executed on any website... I can see the next wave of session hijacking in the making. Your DOM is not safe ;]
- devmonk 16y agoGot 4880 points for blowing up current HN new links.
- RobKohr 16y agoyahoo was a great site to play on. endless targets.
- drewse 16y agoTry it on John Gruber's Daring Fireball. Everything collapses quite nicely and it's fun to start at the top and then shoot everything as you go down!