PageSourceSearch

https://www.tibz.blog/js/scroll-to-top.js?1785761765

js tibz.blog collected 2026-10-05 03:40:44 UTC 398 bytes, 15 lines download raw bytes

1let mybutton = document.getElementById("to-top");
2window.onscroll = function() {scrollFunction()};
3
4function scrollFunction() {
5  if (document.body.scrollTop > 100 || document.documentElement.scrollTop > 100) {
6	mybutton.style.display = "block";
7  } else {
8	mybutton.style.display = "none";
9  }
10}
11
12function topFunction() {
13  document.body.scrollTop = 0;
14  document.documentElement.scrollTop = 0;
15}

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.