Created
January 15, 2018 05:26
-
-
Save s-shin/63d0c47f9f80c9bcbfbbb9cad0fc1d00 to your computer and use it in GitHub Desktop.
Bookmarklet for changing the location of per code view page in github to the one of latest 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 sha = document.querySelector(".commit-tease-sha"); | |
if (sha) { | |
location.href = location.href.replace(/blob\/[^/]+/, `blob/${sha.textContent.trim()}`); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment