I fear that things are being made over complicated.
Depending on what the script actually does, you may be able to simply create
a new userscript and copy paste your existing function to the new
userscript. As long as you remember to actually call the function ;)
Something like the following would work:
// USERCRIPT HEADER //
function currentPage()
{
alert('The URL of the current page is: ' + location.href);
}
currentPage();
Of course, this wholly depends on what the function actually does -- if the
script uses setTimeout() for example, then it will not work. Perhaps you
could provide more details about the function you were thinking of using?
2009/11/18 danicgross <[email protected]>
> Hi,
> Suppose I have a javascript file (loaded normally) that has a function
> 'doSomething();'
> Could that function be defined within a greasemonkey script?
>
> --
>
> 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]<greasemonkey-users%[email protected]>
> .
> For more options, visit this group at
> http://groups.google.com/group/greasemonkey-users?hl=.
>
>
>
--
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.