Greasemonkey script runs on every website

I installed a greasemonkey script to include on only one website:

http://example.com/* 

but it works on every website, me too. I deleted it and added it again, only 1 is included, but it still works on every page, what can I do wrong?

+4
source share
1 answer

This is usually caused by a block of incorrect metadata.

There should be no leading space, and directives are (usually) case sensitive.

Good:

 // ==UserScript== // @name YOUR_SCRIPT_NAME // @include http://YOUR_SERVER.COM/YOUR_PATH/* // ==/UserScript== 


Bad:

  // ==UserScript== // @name YOUR_SCRIPT_NAME // @include http://YOUR_SERVER.COM/YOUR_PATH/* // ==/UserScript== 


Bad:

 //==UserScript== //@name YOUR_SCRIPT_NAME //@include http://YOUR_SERVER.COM/YOUR_PATH/* //==/UserScript== 


Bad:

 // ==UserScript== // @name YOUR_SCRIPT_NAME // @include http://YOUR_SERVER.COM/YOUR_PATH/* // ==/UserScript== 


and etc.



Also, script parameters can override what is in your metadata block. Check them out or just uninstall and reinstall the script.

+5
source

All Articles