if (typeof exportFunction == 'function') {
          // Doc: http://tinyurl.com/k6qphme
          exportFunction(function () {}, unsafeWindow, {
            defineAs : "alert"
          });
        } else {
          unsafeWindow.alert = function () {};
        }

 That's the closest understanding I have of the code,  but that's for a 
pre-existing javascript component or function. Not exactly for what im 
looking for. I may try your idea or your suggestion in a bit. If I can't 
resolve to find a solution using exportFunction, or any of the other others.


On Friday, October 17, 2014 5:25:28 AM UTC-4, Aona Nae wrote:
>
>
>
>
>
>
>
> ajaxChat.handleChatMessages = function(messageNodes) {
>
> ^-- Above as reference. Hey everyone, I'm trying to write a userscript 
> here, and I can't seem to figure out for the life of me, it is day 3 and I 
> looked at examples, researched topics. Constantly refreshed firefox over 
> and over.
>
> I get the feeling that when something in greasemonkey breaks, I don't know 
> about it, I don't know if there's an error in the script. But what I do 
> know is that it works PERFECTLY in Chrome. As that's the browser I mainly 
> use, but when it comes down to porting the script in question I now learned 
> that I need to adhere to the rules of FF's API system.
>
> Which is all fine and dandy, but I want to modify a function at
>
> ajaxChat.handleChatMessages
>
>  since the function is stored in a variable I need to update that variable 
> with a new function.  Perhaps I'm not to be using exportFunction(), but 
> that seems like the appropriate thing. I'm really losing sleep, and my head 
> over this. Firefox has been the most atrocious platform for me to 
> test/develop a userscript on. Is there a way to get the javascript console 
> to be more verbose about errors?
>
> Thanks, if anyone could help me out that'd be much appreciated.
>
> I've been trying to do a exportFunction(ajaxChat.handleChatMessages, 
> unsafeWindow)
>
> But it does not seem to be working. I'm losing it here.
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"greasemonkey-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/greasemonkey-users.
For more options, visit https://groups.google.com/d/optout.

Reply via email to