Bookmarklets
Go to initial commit on GitHub repo. Must have GitHub repo open in active tab.
1
javascript: ((b) =>
2
fetch("https://api.github.com/repos/" + b[1] + "/commits?sha=" + (b[2] || ""))
3
.then((c) => Promise.all([c.headers.get("link"), c.json()]))
4
.then((c) => {
5
if (c[0]) {
6
var d = c[0]
7
.split(",")[1]
8
.split(";")[0]
9
.slice(2, -1);
10
return fetch(d).then((e) => e.json());
11
}
12
return c[1];
13
})
14
.then((c) => c.pop().html_url)
15
.then((c) => (window.location = c)))(
16
window.location.pathname.match(/\/([^\/]+\/[^\/]+)(?:\/tree\/([^\/]+))?/)
17
);
Copied!
Last modified 1yr ago
Copy link