0

Greasemonkey script excludes do nothing, for some reason. They do not even seem to be recognized by Greasemonkey, and I would like to know why.

I have to go into the preferences for each script and add the excludes manually if I want the desired behavior. Apparently I'm getting the syntax correct, since a simple script like (there's nothing special about my choice of domain names, and I've checked it with others):

// ==UserScript==
// @name    Delete Adsense Junk
// @exclude http://en.wikibooks.org/*
// @exclude https://en.wikibooks.org/*
// @include http://weather.org/*
// @include  https://weather.org/*
// @version 1
// ==/UserScript==

alert("Alert!");

tells me all about where the script will and won't execute when I go to install it. Firefox wants to run the script on every page unless I navigate to the preferences for that script and change the user excludes though. The list of script excludes is empty and the include is just the wildcard. Is there some option that should be enabled/disabled that I'm missing? The user excludes seem to work normally. I'm just trying to figure out why Greasemonkey is ignoring the directives that I put in the script.

Chib
  • 11
  • 4
  • What version of Greasemonkey are you using, and what version of Firefox? This sounds like a bug in GM, since I can positively verify that @exclude does work perfectly well on GM 1.15. – Nathan Tuggy Dec 09 '14 at 02:52
  • The code in your question works perfectly. You have not demonstrated any problem and it sounds like your *REAL* script is just malformed. – Brock Adams Dec 09 '14 at 03:15

1 Answers1

-1

The script runs on the page and on all its frames. The alert box tells you which domain it is from (at least in FF). For example on YouTube it also runs for https://plus.google.com and https://s.ytimg.com. So for YouTube I get a total of 3 alerts and if youtube.com is excluded still 2 alerts.

Check out this post to see how to exclude them.

Community
  • 1
  • 1
816-8055
  • 509
  • 7
  • 15