On 04/14/10 09:46, Roberto Nemirovsky wrote:
window.addEventListener("load", function(e) {
   var func = unsafeWindow.manipulate.toString();

Use uneval() or toSource() here instead of toString(). It will give you a string that can be eval()ed (or otherwise run) directly, to reproduce the object in question.

   unsafeWindow.manipulate = new Function("strSymbol", "objItem",
"objUpdate", func);

Especially given, say, the output of uneval(), using the location hack would be a much better way to do this. In fact, running the whole script in the page, and not using unsafeWindow at all, would be a much better idea. See "interacting with the page" link.

* https://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Global_Objects/Function/toSource
* http://wiki.greasespot.net/Location_hack
* http://wiki.greasespot.net/Category:Coding_Tips:Interacting_With_The_Page

--
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.

Reply via email to