How to convert a bookmarklet into a Greasemonkey userscript?
问题 Is there a easy way to do this. And is there anything that needs to be changed due to differences in how it is ran? 回答1: The easiest way to do this: Run the bookmarklet code through a URL decoder. so that javascript:alert%20('Hi%20Boss!')%3B , for example, becomes: javascript:alert ('Hi Boss!'); Strip the leading javascript: off. Result: alert ('Hi Boss!'); Add this code to the end of your Greasemonkey file. For example, create a file named, Hello World.user.js , with this code: // =