You could do it by having a value that can be set globally that all 
GmScripts can access and turn it on and off, and then check it in each 
script to see if that script should execute or not.

The problem is, I think they STILL have not allowed some common global 
variable space, which some people have been asking for, literally, for 
years. Unless they have added it and I missed it.

There might be some other way now to do it. I haven't kept up with many 
of the new changes, like the library includes and some other stuff like 
that. You will probably have to get creative, if it can even be done at 
all. (you can always modify the add on itself, which I have done from 
time to time over the years so that I could do stuff that others either 
thought shouldn't be done, or no one wanted to add to the code)

Some will scream "security risk!", but that is only the case if you 
don't know about it, and care. There are personal things I do in my 
scripts that I don't publish for the world to see, that I wouldn't, 
necessarily, do in a script published for the world. Which allows it a 
certain amount of inherent security. Plus, even if someone did somehow 
try to mess with me, I would notice it, and do something to fix it, if I 
could. But the chances of that happening are pretty much zero.

In your case, who cares if you want to have some "global value" that 
some of your scripts check to see if they should execute, or not. As 
long as your scripts aren't accessing nuclear energy websites that can 
turn valves off and on, etc. And you are aware of the other scripts you 
are using, which wouldn't mess with your global value, anyway.

The "problem" with @include and @exclude, is that they are static and 
you cannot modify them programmatically, so I don't think they would 
work for what it sounds like you want to do.


saruke wrote:
> Is there a way to programatically enable/disable greasemonkey (all its
> scripts) for few sites?
> I am looking for a function whose affect should be same as turning the
> greasemonkey button on and off on the browser.
>
> Thanks in advance,
> Saruke.
> >
>
>   

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"greasemonkey-users" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/greasemonkey-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to