Thank You Anthony,
With Location Hack technique the code was successfully changed:
location.href = ("javascript:(" + function() {
var func = window.manipulate.toSource();
func = func.substring(func.indexOf('{') + 1, func.lastIndexOf('}'));
func = func.replace('#FFCC00', 'transparent');
func = func.replace('#FF0000', 'transparent');
func = func.replace('#00FF00', 'transparent');
window.manipulate = new Function("strSymbol", "objItem", "objUpdate",
func);
} + ")()");
[]´s Roberto
On Wed, Apr 14, 2010 at 11:09 AM, Anthony Lieuallen <[email protected]>wrote:
> 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]<greasemonkey-users%[email protected]>
> .
> For more options, visit this group at
> http://groups.google.com/group/greasemonkey-users?hl=en.
>
>
--
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.