[Greasemonkey] Calling a function in GM from injected HTML

IndaUK indauk at gmail.com
Fri Aug 4 11:52:52 EDT 2006


NB: I am only an average JS coder.

I have managed to inject this piece of HTML into a webpage:

<a href="javascript:RemoveGroup('Foo')">[-]</a>

My GM code looks like this:

function RemoveGroup(sGroupName)
{
    alert(sGroupName)
}

Why do I get a "RemoveGroup is not defined" error when I click the link?

Is this something to do with "unsafewindow"?

My Googling has born no fruit. Any help would be appreciated.
-- 
View this message in context: http://www.nabble.com/Calling-a-function-in-GM-from-injected-HTML-tf2052532.html#a5654824
Sent from the MozDev - greasemonkey forum at Nabble.com.


More information about the Greasemonkey mailing list