FlickrZoom

By eoftedal Last update May 12, 2010 — Installed 50,729 times.

close by pressing ESC (escape) key

in
Subscribe to close by pressing ESC (escape) key 2 posts, 2 voices



nick_name Scriptwright
FirefoxWindows

I patched the handKeyPress() like the following:

=============================================================
function handleKeyPress(e) {
var code = (e.keyCode ? e.keyCode : e.which);
if (fz_activeThumb != null && (code == 39 || code == 37)) {
var imgs = jQuery("img").filter(function(index) { return unWrap(this).canZoom; });
var ix = imgs.index(fz_activeThumb);
zoomMeOut(fz_activeThumb);
ix = ix + (code == 37 ? -1 : +1);
ix = (ix + imgs.length) % imgs.length;
zoomMe(imgs.get(ix));
}

/*-----------------ESC KEYPRESS------------------*/
if (fz_activeThumb != null && (code == 27)) {
zoomMeOut(fz_activeThumb);
return 0;
}
/*-----------------------------------------------*/
}
=============================================================

Hope, you would like to keep it in your next version. Otherwise, every time when you are done browsing through the photos, the window needs to be closed by a mouse button, while moving to left/right photos can be nicely done by pressing left/right arrow keys.

 
eoftedal Script's Author
FirefoxWindows

Done for this old version, but check out FlickrZoom2beta which already supports this.

Cross
Presentational HTML allowed.
Use <code> for inline code and <pre> for code blocks. Use &lt; and &gt; for literal < and >.
We help break paragraphs and link your links.
or cancel