Troubleshooting (Script Authors)

From GreaseSpot Wiki
Revision as of 15:24, 9 July 2007 by 209.200.52.73 (talk)
Jump to navigationJump to search

The article Avoid Common Pitfalls in Greasemonkey covers some of the most common problems people come across when writing user scripts.

If your problem is not listed, please ask on the mailing list.

Changes don't take effect when editing a script

You may be editing your original copy of the script, not the installed copy. Once you create and install a script, you need to follow these steps to make sure you're editing the installed, active copy.

Also, changing the include and exclude rules in the metadata block of the installed script does not do anything, as the script metadata is only accessed during installation. The script must be re-installed (or config.xml edited manually) for these changes to take.

Note: You can change the include and exclude rules in the Manage User Scripts window and those changes will take effect.

Variables change before a GM_xmlhttpRequest or setTimeout callback runs

Problem example:

 for (var i=0; i < document.links.length; i  ) {
   var link = document.links[i];
 
   GM_xmlhttpRequest({
     method: "GET",
     url: '