/* Thank you Drew McLellan for starting us off with http://24ways.org/2006/tasty-text-trimmer */ function TextTrimmer(value) { var self = this; this.minValue = 0; this.maxValue = 100; this.chunks = false; this.prevValue = 0; if (value >= this.maxValue) { this.curValue = this.maxValue; } else if (value < this.minValue) { this.curValue = this.minValue; } else { this.curValue = value; } this.slider = new K2Slider('#trimmerhandle', '#trimmertrack', { minimum: 0, maximum: 10, value: 10, onSlide: function(x) { self.doTrim(x * 10); }, onChange: function(x) { self.doTrim(x * 10); } }); jQuery('#trimmermore').click(function() { self.slider.setValueBy(1); return false; }); jQuery('#trimmerless').click(function() { self.slider.setValueBy(-1); return false; }); jQuery('#trimmertrim').click(function() { self.slider.setValue(self.minValue); return false; }); jQuery('#trimmeruntrim').click(function() { self.slider.setValue(self.maxValue); return false; }); }; TextTrimmer.prototype.trimAgain = function() { this.loadChunks(); this.doTrim(this.curValue); }; TextTrimmer.prototype.loadChunks = function() { var everything = jQuery('#dynamic-content .entry-content'); this.chunks = []; for (i=0; i' + a.join(' ') + ' [...]

'); } } /* Add 'trimmed' class to while active */ if (this.curValue != this.maxValue) { jQuery('#dynamic-content').addClass("trimmed"); } else { jQuery('#dynamic-content').removeClass("trimmed"); } }; /* FILE ARCHIVED ON 11:27:51 Dec 17, 2013 AND RETRIEVED FROM THE INTERNET ARCHIVE ON 22:19:48 Oct 03, 2017. JAVASCRIPT APPENDED BY WAYBACK MACHINE, COPYRIGHT INTERNET ARCHIVE. ALL OTHER CONTENT MAY ALSO BE PROTECTED BY COPYRIGHT (17 U.S.C. SECTION 108(a)(3)). */