Skip to content

Instantly share code, notes, and snippets.

@prendradjaja
Created April 24, 2018 01:16
Show Gist options
  • Save prendradjaja/1fa5c31924200cec92ec354f39867add to your computer and use it in GitHub Desktop.
Save prendradjaja/1fa5c31924200cec92ec354f39867add to your computer and use it in GitHub Desktop.
Go to a GitHub PR's branch
javascript: var repo_url = window.location.href.split('/').slice(0,5).join('/'); var branch_name = document.querySelectorAll('#partial-discussion-header .commit-ref')[1].innerText; window.location.href = repo_url + '/tree/' + branch_name;
var repo_url = window.location.href.split('/').slice(0,5).join('/');
var branch_name = document.querySelectorAll('#partial-discussion-header .commit-ref')[1].innerText;
window.location.href = repo_url + '/tree/' + branch_name;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment