Created
September 15, 2019 15:30
-
-
Save icyflame/136239405d0ccd17d5d47be6c500040f to your computer and use it in GitHub Desktop.
A bookmarklet to go from github.com/user/repo to circleci.com/gh/user/repo
This file contains hidden or 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
javascript: | |
var url = location.href; | |
if (url.match(/https:\/\/github.com\//)) { | |
var baseRemoved = url.replace('https://github.com/', ''); | |
var components = baseRemoved.split('/'); | |
if (components.length >= 2) { | |
var account = components[0]; | |
var repo = components[1]; | |
var newURL = "https://circleci.com/gh/" + account + "/" + repo; | |
location.href = newURL; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment