160d10a30597d7435c30409878e2ba11c3e7c660 mspeir Wed Sep 9 14:19:40 2026 -0700 trackDb docs: stop the shared script from aborting on the pages without a search box, refs #38062 Two JavaScript faults on the trackDb doc pages, both of which trackDbHub.v3.html had already avoided while the other pages drifted. trackDbDoc.html, changes.html and trackDbHub.v0/v1/v2.html load /js/utils.js in their head, and the hgMenubar include further down brings in the same file by a different path, so it ran twice. utils.js declares mouseoverContainer with let at top level, so the second run threw a redeclaration error. v3 does not load utils.js in the head, and the menubar copy is in place well before anything needs it, so drop the head copy from the other five. documentLoad() then called addEventListener on the result of getElementById("tdbSearch") with no null check, and only v3 has that input, so the function threw partway through on the other four pages and never reached its end. The search box and jump-to-top button do not exist on those pages, so nothing visible was lost, but the exception aborted the rest of documentLoad and would have swallowed anything added after it. Guard the two listeners. All six pages now load with no console errors, checked in a browser. Co-Authored-By: Claude Opus 5 (1M context) diff --git src/hg/htdocs/goldenPath/help/trackDb/changes.html src/hg/htdocs/goldenPath/help/trackDb/changes.html index ab2646d648a..c753c837b11 100755 --- src/hg/htdocs/goldenPath/help/trackDb/changes.html +++ src/hg/htdocs/goldenPath/help/trackDb/changes.html @@ -1,27 +1,26 @@ UCSC Track Database Definition History -