Skip to content

Instantly share code, notes, and snippets.

View kaylesworth's full-sized avatar

Kevin Aylesworth kaylesworth

View GitHub Profile
@kaylesworth
kaylesworth / add-github-buttons-to-graphite
Last active March 4, 2024 15:43 — forked from phoebejaffe/add-github-buttons-to-graphite
JS to add Github buttons to Graphite (especially great with Arc Browser Boosts)
function isGraphitePr() {
return (
window.location.hostname === "app.graphite.dev" &&
window.location.pathname.includes("/github/pr/")
);
}
function makeGithubPrUrl() {
const pieces = window.location.pathname.replace("/github/pr/", "").split("/");
return `https://github.com/${pieces[0]}/${pieces[1]}/pull/${