diff --git a/src/hosts/github.ts b/src/hosts/github.ts index f7e5b76..60d9876 100644 --- a/src/hosts/github.ts +++ b/src/hosts/github.ts @@ -76,7 +76,8 @@ export function injectionScope(url: string, gkDotDevUrl: string) { const [, , , type] = this.uri.pathname.split('/'); switch (type) { case 'commit': - insertions.set('.commit > * #browse-at-time-link', { + // Insert button right before the "Browser files" button + insertions.set('#browse-at-time-link', { // This is inside a flexbox, so ml-auto adds a ballooning margin that pushes the element to the right html: /*html*/ `${this.getGitKrakenSvg( 22, @@ -168,7 +169,8 @@ export function injectionScope(url: string, gkDotDevUrl: string) { position: 'afterend', }); - insertions.set('#__primerPortalRoot__ > div > div > div > ul > div > ul > li:first-child', { + // Insert button inside the "Code" modal + insertions.set('#__primerPortalRoot__ > div > div > ul > div > ul > li:first-child', { html: /*html*/ `
  • ${this.getGitKrakenSvg(16, 'mr-2')}