Skip to content
Permalink
master
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Go to file
 
 
Cannot retrieve contributors at this time
/**********************************************************************************************
** jQuery Kill Photoset v1.0 (for Tumblr themes)
** This gets rid of the flash slideshow Tumblr forces photo posts with multiple images to use.
**
** Copyright © 2010 Chris Kalani
** MIT License - http://www.opensource.org/licenses/mit-license.php
** Project URL: http://chriskalani.com/killphotoset
**********************************************************************************************/
;(function($){
var defaults = {
photoSize: 1280
};
$.fn.killPhotoset = function(options){
var o = $.extend(defaults, options);
return this.each(function(){
var $this = $(this);
$this.empty();
var set = $this.attr("id");
var id = set.split("_")[1];
$.getJSON("/api/read/json?id="+id+"&callback=?", function(boom){
var pix = boom["posts"][0]["photos"];
$.each(pix, function(){
var img = this["photo-url-"+o.photoSize];
$this.append('<p><img src="'+img+'" /></p>');
});
});
});
};
})(jQuery);