Skip to content

Instantly share code, notes, and snippets.

@vigorouscoding
Last active December 17, 2015 14:39
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save vigorouscoding/5626079 to your computer and use it in GitHub Desktop.
Save vigorouscoding/5626079 to your computer and use it in GitHub Desktop.
iStockphoto bookmarklets. The is used to maximize preview images on a single image page. The second is used in the search results to double the size of all preview images.
javascript:(function () {
/* zoom the image if it is not yet zoomed */
if (jQuery("#s3img").length == 0) {
jQuery("#ZoomImage").click();
jQuery("#ZoomImage").click();
jQuery("#ZoomImage").click();
}
/* Either open the image in a new window or */
if (confirm("Open image in new window? (you might get 'access forbidden')")) {
window.open(location.protocol + "//" + location.host + jQuery('img#s3img').attr('src'), "iStock maximized", "menubar=yes,toolbar=yes");
} else {
jQuery('#ZoomDroppableDiv').attr('style', jQuery('img#s3img').attr('style') + "; z-index:1");
jQuery('#ZoomDraggableDiv').attr('style', '');
}
})()
javascript:(function(){
items = jQuery('.srItem');
items.css('width', 214);
items.css('height', 224);
images = items.find('.srFile a img');
images.css('width', 200);
jQuery("#srchCntnt").height(jQuery("#srchCntr").height());
})()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment