I have a bookmark that's a JavaScript bookmark. For example:
javascript:alert('hi');
I'd like to be able to get the source of the currently running JavaScript bookmark, from within the bookmark itself, so in pseudocode:
javascript:alert(currentlyExecutingScript.text);
Which would alert
javascript:alert(currentlyExecutingScript.text);
How can I do this? I prefer cross browser solutions, but am completely fine with just Chrome specific solutions!
Why am I interested in this? Because I'm writing a bookmarklet that refers to itself.