[greasemonkey-users] programatically turning off a greasemonkey script

2010-04-28 Thread robro
I have a script I wrote that watches for an event to occur on a webpage then notifies a user with a dialog box. When that occurs, I want the script to stop executing. How can I turn it off at that point? Thanks! -- You received this message because you are subscribed to the Google Groups

Re: [greasemonkey-users] programatically turning off a greasemonkey script

2010-04-28 Thread cc
Usually, just using the JavaScript `return` statement will be good enough -- most versions of Greasemonkey wrap the script in an anonymous function for this very reason. I'm assuming you mean exit the current run of the current script rather than disable the script until the user next enables