On 2009-11-18 07:11, danicgross wrote: > Hi, > Suppose I have a javascript file (loaded normally) that has a function > 'doSomething();' > Could that function be defined within a greasemonkey script? > I assume you mean *re*defined, and yes, it can. Add a <script> element to the page with the function definition in it -- it works well to define the function in the userscript, then do something like
elemScript.innerHtml = doSomething; (Don't type elemScript.innerHtml = doSomething(); -- that won't work.) That will expand the function properly. (You may still want to put in the usual /*<![CDATA[*/.../*]]>*/ chunks to wrap the script, of course.) -- 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=.
