News for hackers. Stuff that matters.
Re:Asteroids JavaScript Bookmarklet to blow up any web site by joshhart on Tuesday September 28, 2010 @08:47PM (#1737909)
Does 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!
Re:Asteroids JavaScript Bookmarklet to blow up any web site by allenp on Wednesday September 29, 2010 @08:40AM (#1739130)
Here 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();

Re:Asteroids JavaScript Bookmarklet to blow up any web site by philfreo on Tuesday September 28, 2010 @08:56PM (#1737923)
What you're talking about has been around forever, and is called a "bookmarklet"

http://en.wikipedia.org/wiki/Bookmarklet

Re:Asteroids JavaScript Bookmarklet to blow up any web site by lipnitsk on Tuesday September 28, 2010 @11:39PM (#1738257)
What a terrible explanation..
Re:Asteroids JavaScript Bookmarklet to blow up any web site by alinajaf on Wednesday September 29, 2010 @04:15AM (#1738674)
I thought it was bad too, so I blew the shit out of it!