Greasemonkey script for bigger thumbs in Bulk Captions/Keywords?

darryldarryl Registered Users Posts: 997 Major grins
Hi -- I know somebody wrote a Greasemonkey script to make the thumbs bigger in bulk captions/keywords, but for the life of me I can't find it here on Dgrin. Can somebody provide a pointer?

Thanks!

Comments

  • darryldarryl Registered Users Posts: 997 Major grins
    edited December 13, 2007
    Of course after posting I find it. Nimai has written a bunch cool GreaseMonkey scripts for SmugMug:

    http://userscripts.org/users/35458;scripts

    StatCounter SmugMug Thumbs - Adds thumbnails to the detailed view of StatCounter

    SmugMug: Zoom Thumb 1x1 - Sets the ratio to "1 x 1" when the zoom-thumb tool is used.

    SmugMug Pro Pricing No-Crop - Adds a "No Crop" button to the pro pricing page for images in SmugMug which will set the price to zero (hide from sale) all print sizes that would require cropping

    SmugMug - Big Bulk Caption - Enlarges the images in SmugMug's Bulk Caption tool
  • darryldarryl Registered Users Posts: 997 Major grins
    edited December 13, 2007
    Oh, and I have a minor fix for the script to support images that have been resized (and now have a -1, etc. after their name), like:

    14121784-Th-1.jpg

    The script now reads as follows:
    // ==UserScript==
    
    // @name           SmugMug - Big Bulk Caption
    
    // @namespace      http://nimai.smugmug.com
    
    // @description    Enlarges the images in SmugMug's Bulk Caption tool
    
    // @include        http://*.smugmug.com/photos/tools.mg?*&tool=bulkcaption
    
    // ==/UserScript==
    
    var r = /-Th(-\d+)?\./;
    var images = document.images;
    for( i=0; i<images.length; ++i ) {
    	var img = images[i];
    	if( img.className == 'thumbs' ) {
    		img.removeAttribute("width");
    		img.removeAttribute("height");
    		img.src = img.src.replace( r, "-S$1." );
    	}
    }
    
  • darryldarryl Registered Users Posts: 997 Major grins
    edited February 6, 2009
    Found another bug: the script wasn't getting activated because SmugMug now appends a url value after the call to bulkcaption (presumably so it knows what page to go back to when the edits are complete). Here's the fix to the Included Pages (just add an asterisk at the end):

    http://*.smugmug.com/photos/tools.mg?*&tool=bulkcaption*

    And the full script:
    // ==UserScript==
    // @name           SmugMug - Big Bulk Caption
    // @namespace      http://nimai.smugmug.com
    // @description    Enlarges the images in SmugMug's Bulk Caption tool
    // @include        http://*.smugmug.com/photos/tools.mg?*&tool=bulkcaption*
    // ==/UserScript==
    
    var r = /-Th(-\d+)?\./;
    var images = document.images;
    for( i=0; i<images.length; ++i ) {
    	var img = images[i];
    	if( img.className == 'thumbs' ) {
    		img.removeAttribute("width");
    		img.removeAttribute("height");
    		img.src = img.src.replace( r, "-S$1." );
    	}
    }
    
Sign In or Register to comment.