File tree Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -76,7 +76,8 @@ export function injectionScope(url: string, gkDotDevUrl: string) {
76
76
const [ , , , type ] = this . uri . pathname . split ( '/' ) ;
77
77
switch ( type ) {
78
78
case 'commit' :
79
- insertions . set ( '.commit > * #browse-at-time-link' , {
79
+ // Insert button right before the "Browser files" button
80
+ insertions . set ( '[aria-label="Browse the repository at this point in the history"]' , {
80
81
// This is inside a flexbox, so ml-auto adds a ballooning margin that pushes the element to the right
81
82
html : /*html*/ `<a data-gk class="btn px-2 ml-auto flex-self-start" style="padding-top:2px !important; padding-bottom:1px !important;" href="${ openUrl } " target="_blank" title="${ label } " aria-label="${ label } ">${ this . getGitKrakenSvg (
82
83
22 ,
@@ -168,7 +169,8 @@ export function injectionScope(url: string, gkDotDevUrl: string) {
168
169
position : 'afterend' ,
169
170
} ) ;
170
171
171
- insertions . set ( '#__primerPortalRoot__ > div > div > div > ul > div > ul > li:first-child' , {
172
+ // Insert button inside the "Code" modal
173
+ insertions . set ( '#__primerPortalRoot__ > div > div > ul > div > ul > li:first-child' , {
172
174
html : /*html*/ `<li data-gk class="Box-row Box-row--hover-gray p-3 mt-0 rounded-0">
173
175
<a class="d-flex flex-items-center color-fg-default text-bold no-underline" href="${ openUrl } " target="_blank" title="${ label } " aria-label="${ label } ">
174
176
${ this . getGitKrakenSvg ( 16 , 'mr-2' ) }
You can’t perform that action at this time.
0 commit comments