PageSourceSearch

https://www.discourse.org/a/js/smooth-scroll.js?1790174693181339485

js discourse.org collected 2026-09-24 06:55:24 UTC 383 bytes, 11 lines download raw bytes

1//* not supported by all browsers yet, but more of an enhancement than a neccessity
2document.querySelectorAll('a[href^="#"]:not([href="#"])').forEach((anchor) => {
3  anchor.addEventListener("click", (e) => {
4    e.preventDefault();
5
6    const targetId = e.target.getAttribute("href");
7    document.querySelector(targetId).scrollIntoView({
8      behavior: "smooth",
9    });
10  });
11});

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.