wiki/assets/edit.js

11 lines
316 B
JavaScript
Raw Normal View History

2021-04-03 15:23:54 +02:00
(() => {
let editLink = document.getElementById("git-repository-button").parentElement
const relativeFile = location
.pathname
.split("/")
.slice(-path_to_root.split("/").length)
.join("/")
.replace(/\.html$/, ".md")
editLink.href = editLink.href + "/edit/master/src/" + relativeFile
})();