summaryrefslogtreecommitdiff
path: root/common/.vimfx/frame.js
blob: 406f1eb875e8715e70e65b66393a9487fc7b2717 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
vimfx.listen("goWayBack", async (_, msg) => {
  content.location.replace("https://web.archive.org/"+content.location)
})

vimfx.listen("goWayForward", (_, msg) => {
  content.location.href =
    content.location.href
    .replace(new RegExp("^.+://web.archive.org/web/[0-9*]+/"), "")
})

vimfx.listen("location.replace", (url, msg) => {
  content.location.replace(url)
})