Skip to content

Instantly share code, notes, and snippets.

@apexskier
Created May 20, 2020 09:37
Show Gist options
  • Save apexskier/d92422785594e285d9bc1c52af378a77 to your computer and use it in GitHub Desktop.
Save apexskier/d92422785594e285d9bc1c52af378a77 to your computer and use it in GitHub Desktop.
Github show at last commit
(() => {
const targetParts = document.querySelector('main .repository-content .Box .Box-body > span:last-child a').href.split("/");
const commit = targetParts[targetParts.length - 1];
const urlParts = location.href.split("/");
urlParts[6] = commit;
document.location = urlParts.join("/");
})()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment