PageSourceSearch

https://kinomaking.ru/static/scroll.js

js kinomaking.ru collected 2026-10-08 14:34:29 UTC 1,613 bytes, 1 lines download raw bytes

1!function(){"use strict";class t{constructor(t){var e,i,o,s,n;o=this,s="throttled",e=this.handleScroll.bind(this),i=Date.now(),n=function(){i+100-Date.now()<0&&(e(),i=Date.now())},(s=function(t){var e=function(t,e){if("object"!=typeof t||null===t)return t;var i=t[Symbol.toPrimitive];if(void 0!==i){var o=i.call(t,"string");if("object"!=typeof o)return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==typeof e?e:String(e)}(s))in o?Object.defineProperty(o,s,{value:n,enumerable:!0,configurable:!0,writable:!0}):o[s]=n,this.element=t,this.visible=!0,this.offset=this.element.dataset.offset,this.scrollParent=window.userScripts.Util.getScrollContainer(this.element)}init(){this.element.addEventListener("click",(t=>{t.preventDefault(),this.scrollParent.scrollTo({top:0,behavior:"smooth"})})),this.offset>0&&(this.toggleButton(!1),this.checkPos(),window.addEventListener("scroll",this.throttled))}toggleButton(t){this.element.style.opacity=t?1:0,this.element.style.pointerEvents=t?"all":"none",this.visible=t}checkPos(){this.scrollParent.scrollTop>=this.offset&&this.toggleButton(!0)}handleScroll(){this.scrollParent.scrollTop>=this.offset&&!this.visible&&this.toggleButton(!0),this.scrollParent.scrollTop<this.offset&&this.visible&&this.toggleButton(!1)}static run(){(arguments.length>0&&void 0!==arguments[0]?arguments[0]:document.body).querySelectorAll('[data-script="scroll-button"]').forEach((e=>new t(e).init()))}}document.addEventListener("DOMContentLoaded",(()=>{t.run()})),window.userScripts=window.userScripts||{},window.userScripts.ScrollBtn=t}();

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.