Created
May 20, 2020 09:37
-
-
Save apexskier/d92422785594e285d9bc1c52af378a77 to your computer and use it in GitHub Desktop.
Github show at last commit
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(() => { | |
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