PageSourceSearch

https://www.qnamarkup.org/syntax/syntax.js

js qnamarkup.org collected 2026-10-04 00:20:30 UTC 688 bytes, 15 lines download raw bytes

1// Opens the "Advanced Usage" box (a <details>) that holds the element a link points at, so that
2// #links, #save and the like land on something visible. No other behaviour.
3(function () {
4  function reveal() {
5    var id = decodeURIComponent(location.hash.replace(/^#/, ''));
6    if (!id) return;
7    var el = document.getElementById(id) || document.querySelector('a[name="' + id.replace(/"/g, '') + '"]');
8    if (!el) return;
9    var opened = false;
10    for (var d = el.parentNode; d; d = d.parentNode) if (d.tagName === 'DETAILS' && !d.open) { d.open = true; opened = true; }
11    if (opened) el.scrollIntoView();
12  }
13  reveal();
14  window.addEventListener('hashchange', reveal);
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.