PageSourceSearch

https://tomberlain.com/files/cache/themes/paperclip-plus/scrolltopcontrol.min.js?v=1789850718

js tomberlain.com collected 2026-10-06 14:01:40 UTC 2,300 bytes, 27 lines download raw bytes

1var scrolltotop={setting:{startline:100,scrollto:0,scrollduration:1000,fadeduration:[500,100]},controlHTML:'<i class="fa fa-angle-up backtotop"></i>',controlattrs:{offsetx:5,offsety:5},anchorkeyword:'#top',state:{isvisible:!1,shouldvisible:!1},scrollup:function(){if(!this.cssfixedsupport)
2this.$control.css({opacity:0})
3var dest=isNaN(this.setting.scrollto)?this.setting.scrollto:parseInt(this.setting.scrollto)
4if(typeof dest=="string"&&jQuery('#'+dest).length==1)
5dest=jQuery('#'+dest).offset().top
6else dest=0
7this.$body.animate({scrollTop:dest},this.setting.scrollduration)},keepfixed:function(){var $window=jQuery(window)
8var controlx=$window.scrollLeft()+$window.width()-this.$control.width()-this.controlattrs.offsetx
9var controly=$window.scrollTop()+$window.height()-this.$control.height()-this.controlattrs.offsety
10this.$control.css({left:controlx+'px',top:controly+'px'})},togglecontrol:function(){var scrolltop=jQuery(window).scrollTop()
11if(!this.cssfixedsupport)
12this.keepfixed()
13this.state.shouldvisible=(scrolltop>=this.setting.startline)?!0:!1
14if(this.state.shouldvisible&&!this.state.isvisible){this.$control.stop().animate({opacity:1},this.setting.fadeduration[0])
15this.state.isvisible=!0}else if(this.state.shouldvisible==!1&&this.state.isvisible){this.$control.stop().animate({opacity:0}
15,this.setting.fadeduration[1])
16this.state.isvisible=!1}},init:function(){jQuery(document).ready(function($){var mainobj=scrolltotop
17var iebrws=document.all
18mainobj.cssfixedsupport=!iebrws||iebrws&&document.compatMode=="CSS1Compat"&&window.XMLHttpRequest
19mainobj.$body=(window.opera)?(document.compatMode=="CSS1Compat"?$('html'):$('body')):$('html,body')
20mainobj.$control=$('<div id="topcontrol">'+mainobj.controlHTML+'</div>').css({position:mainobj.cssfixedsupport?'fixed':'absolute',bottom:mainobj.controlattrs.offsety,right:mainobj.controlattrs.offsetx,opacity:0,cursor:'pointer'}).attr({title:''}).click(function(){mainobj.scrollup();return!1}).appendTo('body')
21if(document.all&&!window.XMLHttpRequest&&mainobj.$control.text()!='')
22mainobj.$control.css({width:mainobj.$control.width()})
23mainobj.togglecontrol()
24$('a[href="'+mainobj.anchorkeyword+'"]').click(function(){mainobj.scrollup()
25return!1})
26$(window).bind('scroll resize',function(e){mainobj.togglecontrol()})})}}
27scrolltotop.init()

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.