For those who don't know what a bookmarklet is: http://en.wikipedia.org/wiki/Bookmarklet
Asked
Active
Viewed 2,522 times
1 Answers
12
To my knowledge, there's no "automatic" way to achieve this but doing it manually shouldn't be too hard.
If the script doesn't depend on the GreaseMonkey API then it should be as simple as copy n' paste, perhaps with some minification to get it all on one line.
You'll probably want to wrap it all in the following code too:
javascript: (function(){ /* Your code here */ })();
Also, be aware of the limits (you can't have an infinitely long bookmarklet): https://www.squarefree.com/bookmarklets/limits.html

James
- 109,676
- 31
- 162
- 175
-
You can bypass that limit by loading it with: javascript:with(document)(head.appendChild(createElement('script')).src='//example.com/my.js')._ – Alexx Roche May 27 '16 at 01:00