This app runs inside the BotSurf browser. Don't have it yet? Get the app or extension now!

Universal Cross-Reference Link Validator

Developer Tools · All
0 installs · Verified BotGentz app
Launch App
Opens in BotSurf — try it free, no account needed.
CategoryDeveloper Tools
PlatformAll
Pricing Free
Installs0
Download BotSurf to use — free
No account needed for free apps. Once BotSurf is open, find this app in Apps from the + menu.

About this app

WHAT IT DOES

This script scans the current page for all cross-reference links—links to other parts of the same page using #id, links to sections, footnotes, endnotes, and internal anchors—and validates that each target ID exists in the document. It displays a floating panel showing a summary of valid and broken cross-references with counts and color-coded status: green for valid, red for broken, yellow for redirected. Each reference is listed with its link text, target ID, source location, and status badge. Broken links are highlighted directly on the page with a red outline and tooltip showing the missing target ID. Users can filter by status, copy the broken link list, and export results as CSV. Cross-reference snapshots are stored per domain locally for tracking link health over time.

WHERE IT RUNS

Works on any webpage with internal links—documentation, articles, wikis, technical manuals, or any page with cross-references. The script scans all anchor tags with href starting with #, as well as footnote and endnote links, making it compatible with most content-rich websites.

HOW TO USE

The panel appears automatically when you visit a page. It detects all cross-reference links and displays a summary with total, valid, broken, and redirect counts. The detailed list shows each link with its text, target ID, status badge, and source location. Broken links are highlighted on the page with a red outline. Use the filter dropdown to show only Valid, Broken, or Redirect links. Click "Refresh Page" to rescan for updated content. Click "Copy Broken Refs" to copy all broken cross-references to your clipboard. Export all results as CSV with target ID, link text, status, and source location. The "Clear History" button removes stored snapshots for the current domain. The panel automatically saves a snapshot each time you visit, building a history of cross-reference health over time.

TECHNICAL MECHANISM: DOM TRAVERSAL WITH TARGET ID RESOLUTION AND STATUS CLASSIFICATION

The script uses DOM traversal to find all anchor tags with href starting with "#". It extracts the target ID (the part after #) and checks if an element with that ID exists using document.getElementById(). It also checks for elements with a matching name attribute as a fallback for legacy pages. Each reference is classified as "valid" if the target exists, "broken" if it doesn't, and "redirect" if the target resolves to a different element (not implemented in basic version). The script also scans for footnote/endnote links using selectors a[href*="#fn"], a[href*="#note"], and a[href*="#ref"] to capture academic-style references. For each reference, it captures the link text, target ID, source location (from the parent paragraph, div, or list item), and the target element for potential future use. Broken links are highlighted by adding a red outline (outline: 2px solid #ef4444) to the anchor element. Each snapshot stores the full reference list with statuses, capped at 30 entries per domain. The filter system allows status-based viewing without reloading the page.

THE PANEL

The cross-reference validator appears in a draggable, resizable panel that remembers its position per site. The panel shows summary stats, a detailed reference list with color-coded status badges, and filter controls. Drag by the header to reposition, collapse to a compact icon with a click, and resize using the bottom-right corner. The panel snaps to screen edges for tidy placement and closes with the Escape key. All settings—filter preference and panel position—persist per website using GM_setValue, so your view returns exactly as you left it.

PLEASE NOTE

This script requires the free BotGentz extension to run. The script only validates internal links (href starting with #)—external URLs and mailto: links are ignored. The highlight feature adds a red outline to broken link elements; this may interfere with the page's existing styles but helps visually locate broken references. The script does not check for redirects (e.g., #old-id that redirects to #new-id) in the current version. All data is stored locally in your browser via GM_setValue and never transmitted. The script can only detect links that are present in the DOM at the time of the scan—dynamically loaded links may not be detected without a manual refresh.

Similar Apps

Log in to BotGentz

Suggest an App

Tell us what you'd find useful — if we build it, we'll email you the moment it's ready.