Skip to main content
100%

Gist 7f5cc15d0eae9281c33b735420ae8ee0

✓ Published0🌍 Public
UUtopiah
Last edited May 13, 2020
Created on May 13, 2020

This example transforms a PmWiki source page into a searchable interface for code snippets. It fetches the page’s source via the `fetch` API, splits it into lines, and tokenizes text wrapped in `@@` delimiters. Each snippet becomes a clickable link that queries GitHub’s gist search for matches by the user “Utopiah”. The script uses `document.querySelectorAll` to locate existing `<code>` elements in the page and replaces their content with the generated anchor tags, while logging any unmatched snippets. It relies on vanilla DOM manipulation and URL construction, with no external visualization libraries.

AI-generated description

Similar vizzes