Hi!
The location hack doesn't seem to work anymore, as location.href
evaluation seems now to be treated asynchronously. Consider:
// ==UserScript==
// @name Location Hack Test
// @namespace tag:[EMAIL PROTECTED],2008:userscripts
// @include *
// ==/UserScript==
if (unsafeWindow.console !== undefined)
GM_log = unsafeWindow.console.log;
location.href = "javascript:void(document.title = 'TEST')";
GM_log(document.title);
setTimeout(function() { GM_log(document.title); }, 0);
This will output on my machine:
tag:[EMAIL PROTECTED],2008:userscripts/Location Hack Test:
greasemonkey-users | Google Groups
tag:[EMAIL PROTECTED],2008:userscripts/Location Hack Test: TEST
So, only after returning from the userscript, the href will be
evaluated. This also makes the getGlobalValue implementation using the
location hack almost unusable. I am not so keen on defining tons of
async callbacks...
I am doing something dumb here?
Regards,
Tilman
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---