How to access page level (local) javascript variable in greasemonkey script?

I just want my GM script to execute window.alert (foo), where foo is equal to the local javascript variable on the page.

Ideas?

+5
source share
1 answer
alert(unsafeWindow.foo);
+6
source

All Articles