Download pool/shard008/JavaScript/0050273_plugins.js from Variable-role/sajaniemi_variable_dataset_large: direct link, hf CLI and curl.
- Browser
- Download file 1.84 kB
-
https://huggingface.co/datasets/Variable-role/sajaniemi_variable_dataset_large/resolve/main/pool/shard008/JavaScript/0050273_plugins.js
- Command line
-
hf download hf://datasets/Variable-role/sajaniemi_variable_dataset_large/pool/shard008/JavaScript/0050273_plugins.js
-
curl -L -o 0050273_plugins.js https://huggingface.co/datasets/Variable-role/sajaniemi_variable_dataset_large/resolve/main/pool/shard008/JavaScript/0050273_plugins.js
1.84 kB
| // Avoid `console` errors in browsers that lack a console. | |
| (function() { | |
| var method; | |
| var noop = function () {}; | |
| var methods = [ | |
| 'assert', 'clear', 'count', 'debug', 'dir', 'dirxml', 'error', | |
| 'exception', 'group', 'groupCollapsed', 'groupEnd', 'info', 'log', | |
| 'markTimeline', 'profile', 'profileEnd', 'table', 'time', 'timeEnd', | |
| 'timeline', 'timelineEnd', 'timeStamp', 'trace', 'warn' | |
| ]; | |
| var length = methods.length; | |
| var console = (window.console = window.console || {}); | |
| while (length--) { | |
| method = methods[length]; | |
| // Only stub undefined methods. | |
| if (!console[method]) { | |
| console[method] = noop; | |
| } | |
| } | |
| }()); | |
| // Place any jQuery/helper plugins in here. | |
| /*global jQuery */ | |
| /*! | |
| * FitText.js 1.2 | |
| * | |
| * Copyright 2011, Dave Rupert http://daverupert.com | |
| * Released under the WTFPL license | |
| * http://sam.zoy.org/wtfpl/ | |
| * | |
| * Date: Thu May 05 14:23:00 2011 -0600 | |
| */ | |
| (function( $ ){ | |
| $.fn.fitText = function( kompressor, options ) { | |
| // Setup options | |
| var compressor = kompressor || 1, | |
| settings = $.extend({ | |
| 'minFontSize' : Number.NEGATIVE_INFINITY, | |
| 'maxFontSize' : Number.POSITIVE_INFINITY | |
| }, options); | |
| return this.each(function(){ | |
| // Store the object | |
| var $this = $(this); | |
| // Resizer() resizes items based on the object width divided by the compressor * 10 | |
| var resizer = function () { | |
| $this.css('font-size', Math.max(Math.min($this.width() / (compressor*10), parseFloat(settings.maxFontSize)), parseFloat(settings.minFontSize))); | |
| }; | |
| // Call once to set. | |
| resizer(); | |
| // Call on resize. Opera debounces their resize by default. | |
| $(window).on('resize.fittext orientationchange.fittext', resizer); | |
| }); | |
| }; | |
| })( jQuery ); | |