PageSourceSearch

http://kanunivakfi.org/uksss2018/js/backgroundsize.min.js

js kanunivakfi.org collected 2026-10-04 23:03:43 UTC 4,342 bytes, 9 lines download raw bytes

1(function($,window,document,Math,undefined){var div=$("<div>")[0],rsrc=/url\(["']?(.*?)["']?\)/,watched=[],positions={top:0,left:0,bottom:1,right:1,center:0.5};if("backgroundSize"in div.style&&!$.debugBGS)return;$.cssHooks.backgroundSize={set:function(elem,value){var firstTime=!$.data(elem,"bgsImg"),pos,$wrapper,$img;$.data(elem,"bgsValue",value);if(firstTime){watched.push(elem);$.refreshBackgroundDimensions(elem,true);$wrapper=$("<div>").css({position:"absolute",zIndex:-1,top:0,right:0,left:0,bottom:0,
2overflow:"hidden"});$img=$("<img>").css({position:"absolute"}).appendTo($wrapper),$wrapper.prependTo(elem);$.data(elem,"bgsImg",$img[0]);pos=($.css(elem,"backgroundPosition")||$.css(elem,"backgroundPositionX")+" "+$.css(elem,"backgroundPositionY")).split(" ");$.data(elem,"bgsPos",[positions[pos[0]]||parseFloat(pos[0])/100,positions[pos[1]]||parseFloat(pos[1])/100]);$.css(elem,"zIndex")=="auto"&&(elem.style.zIndex=0);$.css(elem,"position")=="static"&&(elem.style.position="relative");$.refreshBackgroundImage(elem)}else $.refreshBackground(elem)},
3get:function(elem){return $.data(elem,"bgsValue")||""}};$.cssHooks.backgroundImage={set:function(elem,value){return $.data(elem,"bgsImg")?$.refreshBackgroundImage(elem,value):value}};$.refreshBackgroundDimensions=function(elem,noBgRefresh){var $elem=$(elem),currDim={width:$elem.innerWidth(),height:$elem.innerHe
3ight()},prevDim=$.data(elem,"bgsDim"),changed=!prevDim||(currDim.width!=prevDim.width||currDim.height!=prevDim.height);$.data(elem,"bgsDim",currDim);if(changed&&!noBgRefresh)$.refreshBackground(elem)};
4$.refreshBackgroundImage=function(elem,value){var img=$.data(elem,"bgsImg"),currSrc=(rsrc.exec(value||$.css(elem,"backgroundImage"))||[])[1],prevSrc=img&&img.src,changed=currSrc!=prevSrc,imgWidth,imgHeight;if(changed){img.style.height=img.style.width="auto";img.onload=function(){var dim={width:img.width,height:img.height};if(dim.width==1&&dim.height==1)return;$.data(elem,"bgsImgDim",dim);$.data(elem,"bgsConstrain",false);$.refreshBackground(elem);img.style.visibility="visible";img.onload=null};img.style.visibility=
5"hidden";img.src=currSrc;if(img.readyState||img.complete){img.src="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///ywAAAAAAQABAAACAUwAOw==";img.src=currSrc}elem.style.backgroundImage="none"}};$.refreshBackground=function(elem){var value=$.data(elem,"bgsValue"),elemDim=$.data(elem,"bgsDim"),imgDim=$.data(elem,"bgsImgDim"),$img=$($.data(elem,"bgsImg")),pos=$.data(elem,"bgsPos"),prevConstrain=$.data(elem,"bgsConstrain"),currConstrain,elemRatio=elemDim.width/elemDim.height,imgRatio=imgDim.width/imgDim.height,
6delta;if(value=="contain")if(imgRatio>elemRatio){$.data(elem,"bgsConstrain",currConstrain="width");delta=Math.floor((elemDim.height-elemDim.width/imgRatio)*pos[1]);$img.css({top:delta});if(currConstrain!=prevConstrain)$img.css({width:"100%",height:"auto",left:0})}else{$.data(elem,"bgsConstrain",currConstrain="height");delta=Math.floor((elemDim.width-elemDim.height*imgRatio)*pos[0]);$img.css({left:delta});if(currConstrain!=prevConstrain)$img.css({height:"100%",width:"auto",top:0})}else if(value=="cover")if(imgRatio>
7elemRatio){$.data(elem,"bgsConstrain",currConstrain="height");delta=Math.floor((elemDim.height*imgRatio-elemDim.width)*pos[0]);$img.css({left:-delta});if(currConstrain!=prevConstrain)$img.css({height:"100%",width:"auto",top:0})}else{$.data(elem,"bgsConstrain",currConstrain="width");delta=Math.floor((elemDim.width/imgRatio-elemDim.height)*pos[1]);$img.css({top:-delta});if(currConstrain!=prevConstrain)$img.css({width:"100%",height:"auto",left:0})}};var $event=$.event,$special,dummy={_:0},frame=0,wasResized,
8animRunning;$special=$event.special.throttledresize={setup:function(){$(this).on("resize",$special.handler)},teardown:function(){$(this).off("resize",$special.handler)},handler:function(event,execAsap){var context=this,args=arguments;wasResized=true;if(!animRunning){$(dummy).animate(dummy,{duration:Infinity,step:function(){frame++;if(frame>$special.threshold&&wasResized||execAsap){event.type="throttledresize";$event.dispatch.apply(context,args);wasResized=false;frame=0}if(frame>9){$(dummy).stop();
9animRunning=false;frame=0}}});animRunning=true}},threshold:1};$(window).on("throttledresize",function(){$(watched).each(function(){$.refreshBackgroundDimensions(this)})})})(jQuery,window,document,Math);

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.