Possible Duplicate:
javascript: call an embedded function from a GM script
i'm trying to write a script that will select all friends in the xbox.com message center in order to send a M2AF (message to all friends) without having to manually select all of them.
Compose.ToggleFriend('friend1')
when run in the url bar (prefixed by javascript: of course) this selects friend1 perfectly.
but when i try to implement this into a greasemonkey script it just won't work for some reason.
Use this:
unsafeWindow.Compose.ToggleFriend('friend1');
unsafeWindow points in GM onto the global window-object.
精彩评论