summaryrefslogtreecommitdiff
path: root/common/.vimfx/frame.js
diff options
context:
space:
mode:
Diffstat (limited to 'common/.vimfx/frame.js')
-rw-r--r--common/.vimfx/frame.js13
1 files changed, 1 insertions, 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) => {