PageSourceSearch

https://dpa.org.nz/_resources/themes/dpa/javascript/components/backtotop.js?m=1736392753

js dpa.org.nz collected 2026-10-02 10:16:32 UTC 547 bytes, 18 lines download raw bytes

1// Get the button
2var backToTop = document.getElementById("backToTop");
3
4window.onscroll = function() { scrollFunction() };
5
6function scrollFunction() {
7  if (document.body.scrollTop > 100 || document.documentElement.scrollTop > 100) {
8    backToTop.style.display = "flex";
9  } else {
10    backToTop.style.display = "none";
11  }
12}
13
14// When the user clicks on the button, scroll to the top of the document
15function toTop() {
16  document.body.scrollTop = 0; // For Safari
17  document.documentElement.scrollTop = 0; // For Chrome, Firefox, IE and Opera
18}

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.