< Flash! Floo-od! You'll kill ev'ry one of us!
Separated At Birth >

[Comments] (2) About bookmarklets: I'm starting to get into bookmarklets, and I have a question. Can I write a bookmarklet that activates when you drag and drop a link onto it? I realize that this question, like the question of how to programatically access a browser's open tabs, lies on the line between the browser as an application environment and the browser as an application in its own right. A lot of the stuff I'm starting to think is interesting lies on that line, which I find very strange. This is the first time in my life I've ever cared about drag or drop, much less the two combined.

Filed under:


Posted by Roberto at Wed Sep 29 2004 04:51

I believe that's generally not possible. What you could do is to write a bookmarklet that popups a window showing all the links in the current page; from this window you could select the one you're interested, and process it with Javascript.

Posted by Ian Bicking at Wed Sep 29 2004 13:04

You could also make a bookmarklet that replaced all the links with javascript links, so that clicking on a link would run the actual bookmarklet action you intended. Or maybe it would be easier to attach a function to every anchor tag's onclick event.

[Main] [Edit]

Unless otherwise noted, all content licensed by Leonard Richardson
under a Creative Commons License.