PageSourceSearch

https://s.imgflip.com/v1553/Slider.js

js imgflip.com collected 2026-10-01 06:49:02 UTC 2,055 bytes, 5 lines download raw bytes

1function Slider(r,l,J,e){function z(a){if(g)for(var b=0;b<g;b++)if(a<=h[b]){var f=h[b-1];return(b-1+(a-f)/(h[b]-f))/(g-1)}return(a-k)/(m-k)}function t(a,b){a=parseFloat(a||n.val());c=a<k?0:a>m?1:z(a);d.css("left",100*c+"%");A(a,b)}function A(a,b){if(K){var f=p?d:B,D=parseFloat((p?C:d)[0].style.left);w.css({left:D+"%",width:parseFloat(f[0].style.left)-D+"%"})}E&&!b&&E(a);F&&G.text(a)}function H(a){a.preventDefault();a=c+(a.clientX-x)/y;p&&p.left()>a?a=p.left():v&&v.left()<a?a=v.left():0>a?a=0:1<a&&
2(a=1);if(a!==c){x+=(a-c)*y;c=a;d.css("left",100*c+"%");a=c;if(g){var b=a*(g-1)>>0,f=h[b];a=(f+(a-b/(g-1))*(g-1)*((h[b+1]||m)-f)).toFixed(1/u/10>>0)}else a=parseFloat((Math.round((a*(m-k)+k)/u)*u).toFixed(Math.log(1/u)/Math.log(10)>>0));n.val(a);A(a)}}function I(){$("body").removeClass("nosel");$(document).off("vmousemove",H).off("vmouseup",I)}e=e||{};l=$(l);var n=$(r),k=e.min||0,m=e.max||100;r=r?n.val():e.val;var F=e.showVal,u=e.step||1,E=e.update,K=e.fill,h=e.percentiles||[],g=h.length;g&&(k=h[0],
3m=h[g-1]);var d=$("<div/>",{"class":"mark m"+J}),G=$('<div class="slide-val">').appendTo(d);F&&G.text(r);var x,p,v,C,B,c=z(r),y;if(l.hasClass("slider")){var q=l.find(".slide-bar");q.append(d);var w=l.find(".fill")}else w=$('<div class="fill">'),l.addClass("slider"),q=$("<div/>",{"class":"slide-bar",width:"100%"}),q.append(w).append(d),l.append(q);d.css("left",100*c+"%");this.min=function(a){a&&(k=a,t());return k};this.max=function(a){a&&(m=a,t());return m};this.$marker=function(){return d};this.leftBound=
4function(a){p=a;C=a.$marker()};this.rightBound=function(a){v=a;B=a.$marker()};this.left=function(){return c};this.set=function(a,b){var f=Math.log(1/u)/Math.log(10)>>0;a=Math.round(a*Math.pow(10,f))/Math.pow(10,f);n.val(a);t(a,b)};this.get=function(){return n.val()};this.setBG=function(a){q.css("background",a)};this.update=t;n.change(function(){t()});d.on("vmousedown",function(a){y=q.width();c=parseFloat(d[0].style.left)/100;x=a.clientX;$("body").addClass("nosel");cancelEvent(a);$(document).on("vmousemove",
5H).on("vmouseup",I)})};

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.