markmv - v1.39.2
    Preparing search index...

    Function toWaybackUrl

    • Convert an HTTP(S) URL to its Wayback Machine any-snapshot form.

      The result is the Wayback Machine origin followed by the any-snapshot wildcard path segment and then the original URL appended verbatim, so query strings and anchor fragments stay part of the original URL. A pure text transformation: no network access.

      Parameters

      • url: string

        The URL to convert

      Returns string | undefined

      The Wayback Machine URL, or undefined when the URL is not convertible (not an absolute HTTP(S) URL, or already pointing at the Wayback Machine)

      typescript toWaybackUrl('https://example.com/page?a=1#top'); // https://web.archive.org/web/[wildcard]/https://example.com/page?a=1#top;