BossBey File Manager
PHP:
8.2.30
OS:
Linux
User:
imagivibe
Root
/
home
/
imagivibe
/
www
/
wp-content
/
plugins
/
cmp-coming-soon-maintenance
/
themes
/
construct
📤 Upload
📝 New File
📁 New Folder
Close
Editing: paraxify.min.js
(function(){!function(e,t,i){"use strict";var o;o=function(i,o){var s,n,h,r,f,g;return f=0,g=0,n=0,h={},r=[],0,s=function(t,i){this.options={speed:1,boost:0};for(n in i)this.options[n]=i[n];if((this.options.speed<0||this.options.speed>1)&&(this.options.speed=1),t||(t="paraxify"),e.getElementsByClassName(t.replace(".","")))this.photos=e.getElementsByClassName(t.replace(".",""));else{if(!1===e.querySelector(t))throw new Error("The elements you're trying to select don't exist.");this.photos=querySelector(t)}h=this.options,r=this.photos,this._init(this)},s.prototype={update:function(){for(g=t.innerHeight,n=0;n<r.length;)r[n].style.backgroundPosition="center center",r[n].url=t.getComputedStyle(r[n],!1).backgroundImage.replace(/url\((['"])?(.*?)\1\)/gi,"$2").split(",")[0],r[n].img||(r[n].img=new Image),r[n].url!==r[n].img.src&&(this._check(n),r[n].img.src=r[n].url),n++;this._animate()},_init:function(){this.update(),t.onscroll=function(){this._animate()}.bind(this),t.onresize=function(){this.update()}.bind(this)},_imgReady:function(e){var i;if(i=g,""===e.bgSize||"auto"===e.bgSize){if(this.height<e.offsetHeight)throw e.ok=!1,new Error("The image "+e.url+" ("+this.height+"px) is too short for that container ("+e.offsetHeight+"px).");i=this.height,this.height<g&&(i+=(g-e.offsetHeight)*h.speed)}else if("cover"===e.bgSize){if(g<e.offsetHeight)throw e.ok=!1,new Error("The container ("+e.offsetHeight+"px) can't be bigger than the image ("+g+"px).")}else t.getComputedStyle(e,!1).backgroundSize,this._check(n);e.diff=-(i-e.offsetHeight)*h.speed,e.diff=e.diff-e.offsetHeight*h.boost},_check:function(e){var i;(i=r[e]).ok=!0,i.bgSize=t.getComputedStyle(i,!1).backgroundSize,r[e].img.complete?this._imgReady(i):r[e].img.onload=this._imgReady(i)},_visible:function(e){return f+g>r[e].offsetTop&&f<r[e].offsetTop+r[e].offsetHeight},_animate:function(){var i,o;for(f=void 0!==t.pageYOffset?t.pageYOffset:(e.documentElement||e.body.parentNode||e.body).scrollTop,n=0;n<r.length;)this._check(n),r[n].ok&&"fixed"===t.getComputedStyle(r[n],!1).backgroundAttachment&&this._visible(n)?(i=(f-r[n].offsetTop+g)/(r[n].offsetHeight+g),o=r[n].diff*(i-.5),"cover"!==r[n].bgSize&&(o+=(g-r[n].img.height)/2),o=Math.round(100*o)/100):o="center",r[n].style.backgroundPosition="center "+o+"px",n++}},new s(i,o)},t.paraxify=o}(document,window)}).call(this);
Save
Cancel