PageSourceSearch

https://www.sac-it.dk/system/smoothscroll/smoothscroll.min.js

js sac-it.dk collected 2026-10-09 05:14:13 UTC 7,445 bytes, 1 lines download raw bytes

1!function(){var r,s,t,u,v,g={frameRate:150,animationTime:400,stepSize:100,pulseAlgorithm:!0,pulseScale:4,pulseNormalize:1,accelerationDelta:50,accelerationMax:3,keyboardSupport:!0,arrowScroll:50,fixedBackground:!0,excluded:""},w=g,x=!1,y={x:0,y:0},z=!1,A=document.documentElement,h=[],B=/^Mac/.test(navigator.platform),C={left:37,up:38,right:39,down:40,spacebar:32,pageup:33,pagedown:34,end:35,home:36},D={37:1,38:1,39:1,40:1};function i(){if(!z&&document.body){z=!0;var a=document.body,d=document.documentElement,b=window.innerHeight,g=a.scrollHeight;if(A=document.compatMode.indexOf("CSS")>=0?d:a,r=a,w.keyboardSupport&&c("keydown",I),top!=self)x=!0;else if(ag&&g>b&&(a.offsetHeight<=b||d.offsetHeight<=b)){var i,e=document.createElement("div");e.style.cssText="position:absolute; z-index:-10000; top:0; left:0; right:0; height:"+A.scrollHeight+"px",document.body.appendChild(e),t=function(){i||(i=setTimeout(function(){e.style.height="0",e.style.height=A.scrollHeight+"px",i=null},500))},setTimeout(t,10),c("resize",t);var h={attributes:!0,childList:!0,characterData:!1};if((s=new ac(t)).observe(a,h),A.offsetHeight<=b){var f=document.createElement("div");f.style.clear="both",a.appendChild(f)}}w.fixedBackground||(a.style.backgroundAttachment="scroll",d.style.backgroundAttachment="scroll")}}var E=[],F=!1,G=Date.now();function H(a,c,d){if(X(c,d),1!=w.accelerationMax){var e=Date.now()-G;if(e<w.accelerationDelta){var b=(1+50/e)/2;b>1&&(b=Math.min(b,w.accelerationMax),c*=b,d*=b)}G=Date.now()}if(E.push({x:c,y:d,lastX:c<0?.99:-0.99,lastY:d<0?.99:-0.99,start:Date.now()}),!F){var f=ad(),h=a===f||a===document.body;null==a.$scrollBehavior&&U(a)&&(a.$scrollBehavior=a.style.scrollBehavior,a.style.scrollBehavior="auto");var g=function(p){for(var o=Date.now(),f=0,i=0,e=0;e<E.length;e++){var b=E[e],k=o-b.start,l=k>=w.animationTime,j=l?1:k/w.animationTime;w.pulseAlgorithm&&(j=af(j));var m=b.x*j-b.lastX>>0,n=b.y*j-b.lastY>>0;f+=m,i+=n,b.lastX+=m,b.lastY+=n,l&&(E.splice(e,1),e--)}h?window.scrollBy(f,i):(f&&(a.scrollLeft+=f),i&&(a.scrollTop+=i)),c||d||(E=[]),E.length?ab(g,a,1e3/w.frameRate+1):(F=!1,null!=a.$scrollBehavior&&(a.style.scrollBehavior=a.$scrollBehavior,a.$scrollBehavior=null))};ab(g,a,0),F=!0}}function j(a){z||i();var d=a.target;if(a.defaultPrevented||a.ctrlKey||W(r,"embed")||W(d,"embed")&&/\.pdf/i.test(d.src)||W(r,"object")||d.shadowRoot)return!0;var c=-a.wheelDeltaX||a.deltaX||0,b=-a.wheelDeltaY||a.deltaY||0;B&&(a.wheelDeltaX&&$(a.wheelDeltaX,120)&&(c=-120*(a.wheelDeltaX/Math.abs(a.wheelDeltaX))),a.wheelDeltaY&&$(a.wheelDeltaY,120)&&(b=-120*(a.wheelDeltaY/Math.abs(a.wheelDeltaY)))),c||b||(b=-a.wheelDelta||0),1===a.deltaMode&&(c*=40,b*=40);var e=Q(d);return e?!!Z(b)||void(Math.abs(c)>1.2&&(c*=w.stepSize/120),Math.abs(b)>1.2&&(b*=w.stepSize/120),H(e,c,b),a.preventDefault(),N()):!x||!n||(Object.defineProperty(a,"target",{value:window.frameElement}),parent.wheel(a))}function I(a){var b=a.target,i=a.ctrlKey||a.altKey||a.metaKey||a.shiftKey&&a.keyCode!==C.spacebar;document.body.contains(r)||(r=document.activeElement);var g=/^(button|submit|radio|checkbox|file|color|image)$/i;if(a.defaultPrevented||/^(textarea|select|embed|object)$/i.test(b.nodeName)||W(b,"input")&&!g.test(b.type)||W(r,"video")||aa(a)||b.isContentEditable||i||(W(b,"button")||W(b,"input")&&g.test(b.type))&&a.keyCode===C.spacebar||W(b,"input")&&"radio"==b.type&&D[a.keyCode])return!0;var f=0,d=0,c=Q(r);if(!c)return!x||!n||parent.keydown(a);var e=c.clientHeight;switch(c==document.body&&(e=window.innerHeight),a.keyCode){case C.up:d=-w.arrowScroll;break;case C.down:d=w.arrowScroll;break;case C.spacebar:d=-(a.shiftKey?1:-1)*e*.9;break;case C.pageup:d=-(.9*e);break;case C.pagedown:d=.9*e;break;case C.home:c==document.body&&document.scrollingElement&&(c=document.scrollingElement),d=-c.scrollTop;break;case C.end:var h=c.scrollHeight-c.scrollTop-e;d=h>0?h+10:0;break;case C.left:f=-w.arrowScroll;break;case C.right:f=w.arrowScroll;break;default:return!0}H(c,f,d),a.preventDefault(),N()}function k(a){r=a.target}var l,J=(l=0,function(a){return a.uniqueID||(a.uniqueID=l++)}),K={},L={},M={};function N(){clearTimeout(v),v=setInterval(function(){K=L=M={}},1e3)}function O(a,b,d){for(var e=d?K:L,c=a.length;c--;)e[J(a[c])]=b;return b}function P(a,b){return(b?K:L)[J(a)]}function Q(a){var b=[],d=document.body,e=A.scrollHeight;do{var c=P(a,!1);if(c)return O(b,c);if(b.push(a),e===a.scrollHeight){var f=S(A)&&S(d)||T(A);if(x&&R(A)|| !x&&f)return O(b,ad())}else if(R(a)&&T(a))return O(b,a)}while(a=a.parentElement)}function R(a){return a.clientHeight+10<a.scrollHeight}function S(a){return"hidden"!==getComputedStyle(a,"").getPropertyValue("overflow-y")}function T(b){var a=getComputedStyle(b,"").getPropertyValue("overflow-y");return"scroll"===a||"auto"===a}function U(b){var a=J(b);if(null==M[a]){var c=getComputedStyle(b,"")["scroll-behavior"];M[a]="smooth"==c}return M[a]}function c(a,b,c){window.addEventListener(a,b,c||!1)}function V(a,b,c){window.removeEventListener(a,b,c||!1)}function W(a,b){return a&&(a.nodeName||"").toLowerCase()===b.toLowerCase()}function X(a,b){a=a>0?1:-1,b=b>0?1:-1,(y.x!==a||y.y!==b)&&(y.x=a,y.y=b,E=[],G=0)}if(window.localStorage&&localStorage.SS_deltaBuffer)try{h=localStorage.SS_deltaBuffer.split(",")}catch(Y){}
1function Z(a){if(a){h.length||(h=[a,a,a]),a=Math.abs(a),h.push(a),h.shift(),clearTimeout(u),u=setTimeout(function(){try{localStorage.SS_deltaBuffer=h.join(",")}catch(a){}},1e3);var b=a>120&&_(a),c=!_(120)&&!_(100)&&!b;return a<50||c}}function $(a,b){return Math.floor(a/b)==a/b}function _(a){return $(h[0],a)&&$(h[1],a)&&$(h[2],a)}function aa(c){var a=c.target,b=!1;if(-1!=document.URL.indexOf("www.youtube.com/watch"))do if(b=a.classList&&a.classList.contains("html5-video-controls"))break;while(a=a.parentNode)return b}var m,ab=window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame||function(a,c,b){window.setTimeout(a,b||1e3/60)},ac=window.MutationObserver||window.WebKitMutationObserver||window.MozMutationObserver,ad=(m=document.scrollingElement,function(){if(!m){var a=document.createElement("div");a.style.cssText="height:10000px;width:1px;",document.body.appendChild(a);var b=document.body.scrollTop;document.documentElement.scrollTop,window.scrollBy(0,3),m=document.body.scrollTop!=b?document.body:document.documentElement,window.scrollBy(0,-3),document.body.removeChild(a)}return m});function ae(a){var b,c,d;return(a*=w.pulseScale)<1?b=a-(1-Math.exp(-a)):(c=Math.exp(-1),a-=1,d=1-Math.exp(-a),b=c+d*(1-c)),b*w.pulseNormalize}function af(a){return a>=1?1:a<=0?0:(1==w.pulseNormalize&&(w.pulseNormalize/=ae(1)),ae(a))}var a=window.navigator.userAgent,d=/Edge/.test(a),n=/chrome/i.test(a)&&!d,e=/safari/i.test(a)&&!d,o=/mobile/i.test(a),p=/Windows NT 6.1/i.test(a)&&/rv:11/i.test(a),ag=e&&(/Version\/8/i.test(a)||/Version\/9/i.test(a)),q=!1;try{window.addEventListener("test",null,Object.defineProperty({},"passive",{get:function(){q=!0}}))}catch(ah){}var f="onwheel"in document.createElement("div")?"wheel":"mousewheel";function b(b){for(var a in b)g.hasOwnProperty(a)&&(w[a]=b[a])}f&&(n||e||p)&&!o&&(c(f,j,!!q&&{passive:!1}),c("mousedown",k),c("load",i)),b.destroy=function(){s&&s.disconnect(),V(f,j),V("mousedown",k),V("keydown",I),V("resize",t),V("load",i)},window.SmoothScrollOptions&&b(window.SmoothScrollOptions),"function"==typeof define&&define.amd?define(function(){return b}):"object"==typeof exports?module.exports=b:window.SmoothScroll=b}()

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.