PageSourceSearch

https://www.jcdecaux.co.uk/themes/custom/jcd/html/generic/js/imgLiquid-min.js?tlin39

js jcdecaux.co.uk collected 2026-10-02 08:35:32 UTC 5,034 bytes, 1 lines download raw bytes

1var imgLiquid=imgLiquid||{VER:"0.9.944"};imgLiquid.bgs_Available=!1,imgLiquid.bgs_CheckRunned=!1,imgLiquid.injectCss=".imgLiquid img {visibility:hidden}",function(i){i.fn.extend({imgLiquid:function(t){this.defaults={fill:!0,verticalAlign:"center",horizontalAlign:"center",useBackgroundSize:!0,useDataHtmlAttr:!0,responsive:!0,delay:0,fadeInTime:0,removeBoxBackground:!0,hardPixels:!0,responsiveCheckTime:500,timecheckvisibility:500,onStart:null,onFinish:null,onItemStart:null,onItemFinish:null,onItemError:null},function(){if(!imgLiquid.bgs_CheckRunned){imgLiquid.bgs_CheckRunned=!0;var t=i('<span style="background-size:cover" />');i("body").append(t),function(){var i=t[0];if(i&&window.getComputedStyle){var e=window.getComputedStyle(i,null);e&&e.backgroundSize&&(imgLiquid.bgs_Available="cover"===e.backgroundSize)}}(),t.remove()}}();var e=this;return this.options=t,this.settings=i.extend({},this.defaults,this.options),this.settings.onStart&&this.settings.onStart(),this.each(function(t){var a=e.settings,d=i(this),o=i("img:first",d);function n(){(a.responsive||o.data("imgLiquid_oldProcessed"))&&o.data("imgLiquid_settings")&&(a=o.data("imgLiquid_settings"),d.actualSize=d.get(0).offsetWidth+d.get(0).offsetHeight/1e4,d.sizeOld&&d.actualSize!==d.sizeOld&&r(),d.sizeOld=d.actualSize,setTimeout(n,a.responsiveCheckTime))}function s(){o.data("imgLiquid_error",!0),d.addClass("imgLiquid_error"),a.onItemError&&a.onItemError(t,d,o),l()}function r(){var i,e,n,s,r,g,u,m,c=0,h=0,f=d.width(),v=d.height();void 0===o.data("owidth")&&o.data("owidth",o[0].width),void 0===o.data("oheight")&&o.data("oheight",o[0].height),a.fill===f/v>=o.data("owidth")/o.data("oheight")?(i="100%",e="auto",n=Math.floor(f),s=Math.floor(f*(o.data("oheight")/o.data("owidth")))):(i="auto",e="100%",n=Math.floor(v*(o.data("owidth")/o.data("oheight"))),s=Math.floor(v)),u=f-n,"left"===(r=a.horizontalAlign.toLowerCase())&&(h=0),"center"===r&&(h=.5*u),"right"===r&&(h=u),-1!==r.indexOf("%")&&(r=parseInt(r.replace("%",""),10))>0&&(h=u*r*.01),m=v-s,"top"===(g=a.verticalAlign.toLowerCase())&&(c=0),"center"===g&&(c=.5*m),"bottom"===g&&(c=m),-1!==g.indexOf("%")&&(g=parseInt(g.replace("%",""),10))>0&&(c=m*g*.01),a.hardPixels&&(i=n,e=s),o.css({width:i,height:e,"margin-left":Math.floor(h),"margin-top":Math.floor(c)}),o.data("imgLiquid_oldProcessed")||(o.fadeTo(a.fadeInTime,1),o.data("imgLiquid_oldProcessed",!0),a.removeBoxBackground&&d.css("background-image","none"),d.addClass("imgLiquid_nobgSize"),d.addClass("imgLiquid_ready")),a.onItemFinish&&a.onItemFinish(t,d,o),l()}function l(){t===e.length-1&&e.settings.onFinish&&e.settings.onFinish()}o.length?(o.data("imgLiquid_settings")?(d.removeClass("imgLiquid_error").removeClass("imgLiquid_ready"),a=i.extend({},o.data("imgLiquid_settings"),e.options)):a=i.extend({},e.settings,function(){var i={};if(e.settings.useDataHtmlAttr){var t=d.attr("data-imgLiquid-fill"),a=d.attr("data-imgLiquid-horizontalAlign"),o=d.attr("data-imgLiquid-verticalAlign");"true"!==t&&"false"!==t||(i.fill=Boolean("true"===t)),void 0===a||"left"!==a&&"center"!==a&&"right"!==a&&-1===a.indexOf("%")||(i.horizontalAlign=a),void 0===o||"top"!==o&&"bottom"!==o&&"center"!==o&&-1===o.indexOf("%")||(i.verticalAlign=o)}imgLiquid.isIE&&e.settings.ieFadeInDisabled&&(i.fadeInTime=0);return i}()),o.data("imgLiquid_settings",a),a.onItemStart&&a.onItemStart(t,d,o),imgLiquid.bgs_Available&&a.useBackgroundSize?function(){-1===d.css("background-image").indexOf(o.attr("src"))&&d.css({"background-image":'url("'+o.attr("src")+'")'});d.css({"background-size":a.fill?"cover":"contain","background-position":(a.horizontalAlign+" "+a.verticalAlign).toLowerCase(),"background-repeat":"no-repeat"}),i("a:first",d).css({display:"block",width:"100%",height:"100%"}),i("img",d).css({opacity:"0"}),a.onItemFinish&&a.onItemFinish(t,d,o);d.addClass("imgLiquid_bgSize"),d.addClass("imgLiquid_ready"),l()}():function e(){if(o.data("oldSrc")&&o.data("oldSrc")!==o.attr("src")){var l=o.clone().removeAttr("style");return l.data("imgLiquid_settings",o.data("imgLiquid_settings")),o.parent().prepend(l),o.remove(),(o=l)[0].width=0,void setTimeout(e,10)}if(o.data("imgLiquid_oldProcessed"))return void r();o.data("imgLiquid_oldProcessed",!1);o.data("oldSrc",o.attr("src"));i("img:not(:first)",d).css("display","none");d.css({overflow:"hidden"});o.fadeTo(0,0).removeAttr("width").removeAttr("height").css({visibility:"visible","max-width":"none","max-height":"none",width:"auto",height:"auto",display:"block"});o.on("error",s);o[0].onerror=s;!function i(){if(o.data("imgLiquid_error")||o.data("imgLiquid_loaded")||o.data("imgLiquid_oldProcessed"))return;d.is(":visible")&&o[0].complete&&o[0].width>0&&o[0].height>0?(o.data("imgLiquid_loaded",!0),setTimeout(r,t*a.delay)):setTimeout(i,a.timecheckvisibility)}();n()}()):s()})}})}(jQuery),function(){var i=imgLiquid.injectCss,t=document.getElementsByTagName("head")[0],e=document.createElement("style");e.type="text/css",e.styleSheet?e.styleSheet.cssText=i:e.appendChild(document.createTextNode(i)),t.appendChild(e)}();

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.