[Greasemonkey] Calling a page-defined function

Gary Tyler pile0nades at gmail.com
Mon Aug 14 03:37:05 EDT 2006


On deviantart pages like http://www.deviantart.com/view/37691959/ the
picture is always small now, regardless of /view/ in the url. I want to
write a script to fix this, but don't know how to call the method
Deviation.zoomIn() to load the full image. I can make it work through
unsafeWindow but I don't want to use that as its dangerous.

I also tried to fire the onclick event that zooms in, but I can't find the
method to fire it.

  var deviation = get("span[@id='zoomed-out']/a");
  deviation.click();

This does not work. How do you fire an element's onclick event? Or, get to
Deviation.zoomIn() without using unsafeWindow?


More information about the Greasemonkey mailing list