Skip to Content

JavaScript File

URL: http://xlib.info/js/services/scrollFix2.js?v=140
HTTP Status: 200 OK
MIME Type: application/javascript
Last Modified: Thu, 08 Jul 2021 05:26:35 GMT
Download Time: Less than a second
Cookies: None
Size: 12 KB
HTTP Headers:  10 headers
Links In:  1 pages
Links Out:  0 links
Images:  0 images
CSS:  0 files
JavaScript:  0 files
OK Issues: No issues found

1/* https://github.com/somewebmedia/hc-sticky 2.2.3 */

2function _typeof(t){return(_typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}

3:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t}

4)(t)}

5

6!function(t,e){"use strict";if("object"===("undefined"==typeof module?"undefined":_typeof(module))&&"object"===_typeof(module.exports)){if(!t.document)throw new Error("HC-Sticky requires a browser to run.");module.exports=e(t)}

7else"function"==typeof define&&define.amd?define("hcSticky",[],e(t)):e(t)}

8("undefined"!=typeof window?window:this,function(_){"use strict";var U={top:0,bottom:0,bottomEnd:0,innerTop:0,innerSticker:null,stickyClass:"sticky",stickTo:null,followScroll:!0,responsive:null,mobileFirst:!1,onStart:null,onStop:null,onBeforeResize:null,onResize:null,resizeDebounce:100,disable:!1,queries:null,queryFlow:"down"}

9,Y=function(t,e,o){console.warn("%cHC Sticky:%c "+o+"%c '"+t+"'%c is now deprecated and will be removed. Use%c '"+e+"'%c instead.","color: #fa253b","color: default","color: #5595c6","color: default","color: #5595c6","color: default")}

10,$=_.document,Q=function(i){var o=this,f=1<arguments.length&&void 0!==arguments[1]?arguments[1]:{}

11;if("string"==typeof i&&(i=$.querySelector(i)),!i)return!1;f.queries&&Y("queries","responsive","option"),f.queryFlow&&Y("queryFlow","mobileFirst","option");var p={}

12,u=Q.Helpers,s=i.parentNode;"static"===u.getStyle(s,"position")&&(s.style.position="relative");var r,l,a,c,d,y,m,g,h,b,v,S,w,k,E,x,L,T,j,O=function(){var t=0<arguments.length&&void 0!==arguments[0]?arguments[0]:{}

13;u.isEmptyObject(t)&&!u.isEmptyObject(p)||(p=Object.assign({}

14,U,p,t))}

15,t=function(){return p.disable}

16,e=function(){var t,e=p.responsive||p.queries;if(e){var o=_.innerWidth;if(t=f,(p=Object.assign({}

17,U,t||{}

18)).mobileFirst)for(var n in e)n<=o&&!u.isEmptyObject(e[n])&&O(e[n]);else{var i=[];for(var s in e){var r={}

19;r[s]=e[s],i.push(r)}

20for(var l=i.length-1;0<=l;l--){var a=i[l],c=Object.keys(a)[0];o<=c&&!u.isEmptyObject(a[c])&&O(a[c])}

21}

22}

23}

24,C={css:{}

25,position:null,stick:function(){var t=0<arguments.length&&void 0!==arguments[0]?arguments[0]:{}

26;u.hasClass(i,p.stickyClass)||(!1===z.isAttached&&z.attach(),C.position="fixed",i.style.position="fixed",i.style.left=z.offsetLeft+"px",i.style.width=z.width,void 0===t.bottom?i.style.bottom="auto":i.style.bottom=t.bottom+"px",void 0===t.top?i.style.top="auto":i.style.top=t.top+"px",i.classList?i.classList.add(p.stickyClass):i.className+=" "+p.stickyClass,p.onStart&&p.onStart.call(i,Object.assign({}

27,p)))}

28,release:function(){var t=0<arguments.length&&void 0!==arguments[0]?arguments[0]:{}

29;if(t.stop=t.stop||!1,!0===t.stop||"fixed"===C.position||null===C.position||!(void 0===t.top&&void 0===t.bottom||void 0!==t.top&&(parseInt(u.getStyle(i,"top"))||0)===t.top||void 0!==t.bottom&&(parseInt(u.getStyle(i,"bottom"))||0)===t.bottom)){!0===t.stop?!0===z.isAttached&&z.detach():!1===z.isAttached&&z.attach();var e=t.position||C.css.position;C.position=e,i.style.position=e,i.style.left=!0===t.stop?C.css.left:z.positionLeft+"px",i.style.width="absolute"!==e?C.css.width:z.width,void 0===t.bottom?i.style.bottom=!0===t.stop?"":"auto":i.style.bottom=t.bottom+"px",void 0===t.top?i.style.top=!0===t.stop?"":"auto":i.style.top=t.top+"px",i.classList?i.classList.remove(p.stickyClass):i.className=i.className.replace(new RegExp("(^|\\b)"+p.stickyClass.split(" ").join("|")+"(\\b|$)","gi")," "),p.onStop&&p.onStop.call(i,Object.assign({}

30,p))}

31}

32}

33,z={el:$.createElement("div"),offsetLeft:null,positionLeft:null,width:null,isAttached:!1,init:function(){for(var t in z.el.className="sticky-spacer",C.css)z.el.style[t]=C.css[t];z.el.style["z-index"]="-1";var e=u.getStyle(i);z.offsetLeft=u.offset(i).left-(parseInt(e.marginLeft)||0),z.positionLeft=u.position(i).left,z.width=u.getStyle(i,"width")}

34,attach:function(){s.insertBefore(z.el,i),z.isAttached=!0}

35,detach:function(){z.el=s.removeChild(z.el),z.isAttached=!1}

36}

37,n=function(){var t,e,o,n;C.css=(t=i,e=u.getCascadedStyle(t),o=u.getStyle(t),n={height:t.offsetHeight+"px",left:e.left,right:e.right,top:e.top,bottom:e.bottom,position:o.position,display:o.display,verticalAlign:o.verticalAlign,boxSizing:o.boxSizing,marginLeft:e.marginLeft,marginRight:e.marginRight,marginTop:e.marginTop,marginBottom:e.marginBottom,paddingLeft:e.paddingLeft,paddingRight:e.paddingRight}

38,e.float&&(n.float=e.float||"none"),e.cssFloat&&(n.cssFloat=e.cssFloat||"none"),o.MozBoxSizing&&(n.MozBoxSizing=o.MozBoxSizing),n.width="auto"!==e.width?e.width:"border-box"===n.boxSizing||"border-box"===n.MozBoxSizing?t.offsetWidth+"px":o.width,n),z.init(),r=!(!p.stickTo||!("document"===p.stickTo||p.stickTo.nodeType&&9===p.stickTo.nodeType||"object"===_typeof(p.stickTo)&&p.stickTo instanceof("undefined"!=typeof HTMLDocument?HTMLDocument:Document))),l=p.stickTo?r?$:"string"==typeof p.stickTo?$.querySelector(p.stickTo):p.stickTo:s,E=(T=function(){var t=i.offsetHeight+(parseInt(C.css.marginTop)||0)+(parseInt(C.css.marginBottom)||0),e=(E||0)-t;return-1<=e&&e<=1?E:t}

39)(),c=(L=function(){return r?Math.max($.documentElement.clientHeight,$.body.scrollHeight,$.documentElement.scrollHeight,$.body.offsetHeight,$.documentElement.offsetHeight):l.offsetHeight}

40)(),d=r?0:u.offset(l).top,y=p.stickTo?r?0:u.offset(s).top:d,m=_.innerHeight,x=i.offsetTop-(parseInt(C.css.marginTop)||0),a=p.innerSticker?"string"==typeof p.innerSticker?$.querySelector(p.innerSticker):p.innerSticker:null,g=isNaN(p.top)&&-1<p.top.indexOf("%")?parseFloat(p.top)/100*m:p.top,h=isNaN(p.bottom)&&-1<p.bottom.indexOf("%")?parseFloat(p.bottom)/100*m:p.bottom,b=a?a.offsetTop:p.innerTop?p.innerTop:0,v=isNaN(p.bottomEnd)&&-1<p.bottomEnd.indexOf("%")?parseFloat(p.bottomEnd)/100*m:p.bottomEnd,S=d-g+b+x}

...

</html>