PageSourceSearch

https://melissacohenlcsw.com/wp-content/themes/hayden/js/jquery.fittext.js?ver=1.0

js melissacohenlcsw.com collected 2026-09-26 08:27:51 UTC 1,115 bytes, 44 lines download raw bytes

1/*global jQuery */
2/*!	
3* FitText.js 1.0
4*
5* Copyright 2011, Dave Rupert http://daverupert.com
6* Released under the WTFPL license 
7* http://sam.zoy.org/wtfpl/
8*
9* Date: Thu May 05 14:23:00 2011 -0600
10*/
11
12(function( $ ){
13	
14	$.fn.fitText = function( kompressor, options ) {
15	    
16	    var settings = {
17        'minFontSize' : Number.NEGATIVE_INFINITY,
18        'maxFontSize' : Number.POSITIVE_INFINITY
19      };
20	
21			return this.each(function(){
22				var $this = $(this);              // store the object
23				var compressor = kompressor || 1; // set the compressor
24        
25        if ( options ) { 
26          $.extend( settings, options );
27        }
28        
29        // Resizer() resizes items based on the object width divided by the compressor * 10
30				var resizer = function () {
31					$this.css('font-size', Math.max(Math.min($this.width() / (compressor*10), parseFloat(settings.maxFontSize)), parseFloat(settings.minFontSize)));
32				};
33
34				// Call once to set.
35				resizer();
36				
37				// Call on resize. Opera debounces their resize by default. 
38      	$(window).resize(resizer);
39      	
40			});
41
42	};
43
44})( jQuery );

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.