Last active
November 11, 2025 19:08
-
-
Save nickv2002/f697a3774917369215f1b81eebee4c67 to your computer and use it in GitHub Desktop.
Bookmarklet to switch between GitHub and Graphite PR Pages
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:(()=>{const{host,pathname}=location;if(host.includes('github.com')&&pathname.includes('/pull/')){const m=pathname.match(/^\/([^/]+)\/([^/]+)\/pull\/(\d+)(?:\/|$)/);if(m){window.open('https://app.graphite.com/github/pr/'+m[1]+'/'+m[2]+'/'+m[3],'_blank');}else{alert('Could not parse GitHub PR URL.');}}else if((host.includes('app.graphite.com')||host.includes('app.graphite.dev'))&&pathname.includes('/github/pr/')){const m=pathname.match(/^\/github\/pr\/([^/]+)\/([^/]+)\/(\d+)(?:\/|$)/);if(m){window.open('https://github.com/'+m[1]+'/'+m[2]+'/pull/'+m[3],'_blank');}else{alert('Could not parse Graphite PR URL.');}}else{alert('Not a GitHub or Graphite PR URL.');}})(); |
Author
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Create a new bookmark and paste that in as the URL. Call it whatever you want. Mine is
Graphite↔GH