Vampire
06/01/2023, 8:01 PMJacob Gold
06/01/2023, 8:02 PMVampire
06/01/2023, 8:05 PMJacob Gold
06/01/2023, 8:07 PMVampire
06/01/2023, 8:07 PMG A
is shown but does not workVampire
06/01/2023, 8:07 PMJacob Gold
06/01/2023, 8:09 PMVampire
06/01/2023, 8:09 PMVampire
06/01/2023, 8:10 PMG then
shortcutsDavid Balatero
06/01/2023, 8:11 PMVampire
06/01/2023, 8:11 PMJacob Gold
06/01/2023, 8:12 PMMaybe because I expected it at the other G then shortcutsyeah, they're sorted by page — that shortcut only works on the PR page so it's down there
Vampire
06/01/2023, 8:12 PMVampire
06/01/2023, 8:13 PMcan you say more about why you're hoping to jump to the Github view, just to get a better sense of what you wanted to do?Not trusting Graphite yet (or maybe ever :-D) The canonical thing is still GitHub.
David Balatero
06/01/2023, 8:18 PMVampire
06/01/2023, 8:19 PMCole Erickson
06/02/2023, 4:12 PMJacob Gold
06/02/2023, 4:14 PMJacob Gold
06/02/2023, 4:14 PMJacob Gold
06/02/2023, 4:14 PMJacob Gold
06/02/2023, 4:15 PMVampire
06/02/2023, 4:17 PMVampire
06/02/2023, 4:18 PMVampire
06/02/2023, 11:07 PM// ==UserScript==
// @name Graphite -> GitHub
// @description Injects a button to go to GitHub PR page from Graphite PR details
// @author Björn Kautler
// @version 1.0
// @match <https://app.graphite.dev/*>
// @require <https://code.jquery.com/jquery-3.7.0.slim.min.js>
// ==/UserScript==
(function() {
let observer = new MutationObserver((mutations) => {
if ($(".pull-request").length == 0) return
if ($("#go-to-github").length != 0) return
$(".header__nav").prepend('<button id="go-to-github" type="submit" class="buttons__button buttons__button__style--solid buttons__button__size--default" style="margin-right: 5px; background-color: gray"><img src="<https://github.githubassets.com/pinned-octocat.svg>" width="100%" height="100%"/></button>')
$("#go-to-github").click(() => {
window.open(window.location.href.replace(/^https:\/\/app.graphite.dev\/github\/pr\/([^\/]+)\/([^\/]+)\/([^\/]+)(\/.*)?$/, '<https://github.com/$1/$2/pull/$3>'), '_blank')
return false
})
})
observer.observe(document.body, { childList: true, subtree: true, attributes: false, characterData: false })
})();
Vampire
06/02/2023, 11:11 PMVampire
06/08/2023, 9:40 PM// ==UserScript==
// @name Graphite -> GitHub
// @description Injects a button to go to GitHub PR page from Graphite PR details
// @author Björn Kautler
// @version 1.1
// @match <https://app.graphite.dev/*>
// @require <https://code.jquery.com/jquery-3.7.0.slim.min.js>
// ==/UserScript==
(function() {
let observer = new MutationObserver((mutations) => {
if ($(".pull-request").length == 0) return
if ($("#go-to-github").length != 0) return
$(".header__nav").prepend('<button id="go-to-github" type="submit" class="buttons__button buttons__button__style--solid buttons__button__size--default" style="margin-right: 5px; background-color: gray; width: unset"><img src="<https://github.githubassets.com/pinned-octocat.svg>" width="100%" height="100%"/></button>')
$("#go-to-github").click(() => {
window.open(window.location.href.replace(/^https:\/\/app.graphite.dev\/github\/pr\/([^\/]+)\/([^\/]+)\/([^\/]+)(\/.*)?$/, '<https://github.com/$1/$2/pull/$3>'), '_blank')
return false
})
})
observer.observe(document.body, { childList: true, subtree: true, attributes: false, characterData: false })
})();
Vampire
08/15/2023, 11:32 AM// ==UserScript==
// @name Graphite -> GitHub
// @description Injects a button to go to GitHub PR page from Graphite PR details
// @author Björn Kautler
// @version 1.2
// @match <https://app.graphite.dev/*>
// @require <https://code.jquery.com/jquery-3.7.0.slim.min.js>
// ==/UserScript==
(function() {
let observer = new MutationObserver((mutations) => {
if ($(".pull-request__description").length == 0) return
if ($("#go-to-github").length != 0) return
$(".header__nav").prepend('<button id="go-to-github" type="submit" style="margin-right: 5px; background-color: gray"><img src="<https://github.githubassets.com/pinned-octocat.svg>" width="16" height="16"/></button>')
$("#go-to-github").click(() => {
window.open(window.location.href.replace(/^https:\/\/app.graphite.dev\/github\/pr\/([^\/]+)\/([^\/]+)\/([^\/]+)(\/.*)?$/, '<https://github.com/$1/$2/pull/$3>'), '_blank')
return false
})
})
observer.observe(document.body, { childList: true, subtree: true, attributes: false, characterData: false })
})();
Vampire
02/26/2024, 10:48 AMVampire
02/26/2024, 10:48 AM// ==UserScript==
// @name Graphite -> GitHub
// @description Injects a button to go to GitHub PR page from Graphite PR details
// @author Björn Kautler
// @version 1.3
// @match <https://app.graphite.dev/*>
// @require <https://code.jquery.com/jquery-3.7.0.slim.min.js>
// ==/UserScript==
(function() {
let observer = new MutationObserver((mutations) => {
if ($("[data-testid='pull-request-description']").lentgh == 0) return
if ($("#go-to-github").length != 0) return
$(".dropdown-anchor").prepend('<button id="go-to-github" type="submit" style="margin-right: 5px; background-color: gray"><img src="<https://github.githubassets.com/pinned-octocat.svg>" width="16" height="16"/></button>')
$("#go-to-github").click(() => {
window.open(window.location.href.replace(/^https:\/\/app.graphite.dev\/github\/pr\/([^\/]+)\/([^\/]+)\/([^\/]+)(\/.*)?$/, '<https://github.com/$1/$2/pull/$3>'), '_blank')
return false
})
})
observer.observe(document.body, { childList: true, subtree: true, attributes: false, characterData: false })
})();
Cole Erickson
02/26/2024, 8:27 PM