From 4b83e38e03e037ab70c34ecc664e6858f3efe2d5 Mon Sep 17 00:00:00 2001 From: Simon Parri Date: Thu, 25 Sep 2025 11:45:36 -0500 Subject: VimFX: Reimplement `goWayBack' more simply and more reliably --- common/.vimfx/frame.js | 13 +------------ 1 file changed, 1 insertion(+), 12 deletions(-) diff --git a/common/.vimfx/frame.js b/common/.vimfx/frame.js index d06bd2b..406f1eb 100644 --- a/common/.vimfx/frame.js +++ b/common/.vimfx/frame.js @@ -1,16 +1,5 @@ vimfx.listen("goWayBack", async (_, msg) => { - try { - let eUrl = encodeURIComponent(content.location) - let aUrl = `https://archive.org/wayback/available?url=${eUrl}&closest=either&status_code=200` - let res = await content.fetch(aUrl) - if (!res.ok) return msg("Network error; failed to time travel") - let json = await res.json() - let nUrl = json?.archived_snapshots?.closest?.url - if (nUrl) - content.location = nUrl - else - msg("No URLs to travel to") - } catch { msg("Failed to time travel") } + content.location.replace("https://web.archive.org/"+content.location) }) vimfx.listen("goWayForward", (_, msg) => { -- cgit v1.2.3