1/* 2 * Re-apply the lightbox image links after an instant navigation. 3 * 4 * With the privacy plugin enabled, mkdocs-glightbox emits the image anchors 5 * without an href and fills it in from the img afterwards, using a one-shot 6 * inline script. navigation.instant (inherited from orchestrator-core) swaps 7 * in a new page without re-running that script, leaving the anchors empty: 8 * the lightbox then opens on nothing and shows a spinner forever. 9 * 10 * Loaded via extra_javascript, so this subscriber is registered before the 11 * lightbox.reload() one that mkdocs-glightbox appends to the body, and thus 12 * runs first on every page load. 13 */ 14document$.subscribe(function () { 15 document.querySelectorAll("a.glightbox:not([href])").forEach(function (el) { 16 const img = el.querySelector("img") 17 if (img && img.src) { 18 el.setAttribute("href", img.src) 19 } 20 }) 21})
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.