@@ -173,7 +173,7 @@ export const buttonContributions: ButtonContributionParams[] = [
173
173
"https://gitlab.com/svenefftinge/browser-extension-test/-/issues/1" ,
174
174
] ,
175
175
match : / \/ i s s u e s \/ / ,
176
- selector : "#content-body > div.issue-details.issuable-details.js-issue-details > div.detail-page-description.content-block.js-detail-page-description.gl-pt-3.gl-pb-0.gl-border-none > div:nth-child(1) > div > div.gl-display-flex.gl-align-items-flex-start.gl-flex-direction-column.gl-sm-flex-direction-row.gl-gap-3.gl-pt-3 > div" ,
176
+ selector : "#content-body > div.issue-details.issuable-details.js-issue-details > div.detail-page-description.content-block.js-detail-page-description.gl-pt-3.gl-pb-0.gl-border-none > div:nth-child(1) > div > div.gl-display-flex > div" ,
177
177
containerElement : createElement ( "div" , { marginLeft : "0" , marginRight : "0px" } ) ,
178
178
application : "gitlab" ,
179
179
insertBefore : "#new-actions-header-dropdown" ,
@@ -191,31 +191,23 @@ export const buttonContributions: ButtonContributionParams[] = [
191
191
192
192
// GitHub
193
193
{
194
- id : "new-repo" ,
194
+ id : "gh- new-repo" ,
195
195
exampleUrls : [
196
196
// disabled testing, because the new layout doesn't show as an anonymous user
197
197
// "https://github.com/svenefftinge/browser-extension-test",
198
198
// "https://github.com/svenefftinge/browser-extension-test/tree/my-branch",
199
199
] ,
200
- selector : "#repository-details- container > ul" ,
201
- containerElement : createElement ( "li " , {
202
- } ) ,
200
+ selector : `xpath://*[@id="repo-content-pjax- container"]/div/div/div[2]/div[1]/react-partial/div/div/div[1]/div/div/div[2]/div[2]/div/div[3]/div[1]/div[2]` ,
201
+ containerElement : createElement ( "div " , { } ) ,
202
+ additionalClassNames : [ "medium" ] ,
203
203
application : "github" ,
204
- manipulations : [
205
- {
206
- // make the code button secondary
207
- element : "#repository-details-container > ul > li > get-repo > details > summary" ,
208
- remove : "Button--primary" ,
209
- add : "Button--secondary"
210
- }
211
- ] ,
212
204
match : ( ) => {
213
205
const regex = / ^ h t t p s ? : \/ \/ ( [ ^ / ] + ) \/ ( [ ^ / ] + ) \/ ( [ ^ / ] + ) ( \/ ( t r e e \/ .* ) ? ) ? $ / ;
214
206
return document . querySelector ( "div.file-navigation" ) === null && regex . test ( window . location . href ) ;
215
207
}
216
208
} ,
217
209
{
218
- id : "commit" ,
210
+ id : "gh- commit" ,
219
211
exampleUrls : [
220
212
"https://github.com/svenefftinge/browser-extension-test/commit/82d701a9ac26ea25da9b24c5b3722b7a89e43b16"
221
213
] ,
@@ -230,7 +222,7 @@ export const buttonContributions: ButtonContributionParams[] = [
230
222
} ,
231
223
232
224
{
233
- id : "issues" ,
225
+ id : "gh- issues" ,
234
226
exampleUrls : [
235
227
"https://github.com/svenefftinge/browser-extension-test/issues/1"
236
228
] ,
@@ -250,7 +242,7 @@ export const buttonContributions: ButtonContributionParams[] = [
250
242
] ,
251
243
} ,
252
244
{
253
- id : "pulls" ,
245
+ id : "gh- pulls" ,
254
246
exampleUrls : [
255
247
"https://github.com/svenefftinge/browser-extension-test/pull/2" ,
256
248
] ,
@@ -261,8 +253,9 @@ export const buttonContributions: ButtonContributionParams[] = [
261
253
match : / \/ p u l l \/ / ,
262
254
application : "github" ,
263
255
} ,
256
+ // Look into removing since GitHub is shifting to the new repo layout (see gh-new-repo)
264
257
{
265
- id : "repo" ,
258
+ id : "gh- repo" ,
266
259
exampleUrls : [
267
260
"https://github.com/svenefftinge/browser-extension-test" ,
268
261
"https://github.com/svenefftinge/browser-extension-test/tree/my-branch" ,
@@ -283,7 +276,7 @@ export const buttonContributions: ButtonContributionParams[] = [
283
276
] ,
284
277
} ,
285
278
{
286
- id : "file" ,
279
+ id : "gh- file" ,
287
280
exampleUrls : [
288
281
"https://github.com/svenefftinge/browser-extension-test/blob/my-branch/README.md"
289
282
] ,
@@ -295,7 +288,7 @@ export const buttonContributions: ButtonContributionParams[] = [
295
288
additionalClassNames : [ "medium" ] ,
296
289
} ,
297
290
{
298
- id : "empty-repo" ,
291
+ id : "gh- empty-repo" ,
299
292
exampleUrls : [
300
293
//TODO fixme "https://github.com/svenefftinge/empty-repo",
301
294
] ,
@@ -356,7 +349,7 @@ export const buttonContributions: ButtonContributionParams[] = [
356
349
exampleUrls : [
357
350
// "https://bitbucket.org/svenefftinge/browser-extension-test/src/master/"
358
351
] ,
359
- selector : 'xpath://*[@id="root"]/div[2] /div[3]/div/div/div[1]/div/header/div/div/div/div[2]/div' ,
352
+ selector : 'xpath://*[@id="root"]/div/div[3]/div/div/div[1]/div/header/div/div/div/div[2]/div' ,
360
353
insertBefore : "#root > div.css-kyhvoj > div.css-e48442 > div > div > div.css-8ypwyz.efo6slf1 > div > header > div > div > div > div.sc-kAzzGY.hKOvhL > div > div:nth-child(3)" ,
361
354
containerElement : createElement ( "div" , {
362
355
marginLeft : "2px" ,
@@ -380,7 +373,7 @@ export const buttonContributions: ButtonContributionParams[] = [
380
373
exampleUrls : [
381
374
// "https://bitbucket.org/efftinge/browser-extension-test/branch/my-branch"
382
375
] ,
383
- selector : 'xpath://*[@id="root"]/div[2] /div[3]/div/div/div[1]/div/div/div[2]/div/div' ,
376
+ selector : 'xpath://*[@id="root"]/div/div[3]/div/div/div[1]/div/div/div[2]/div/div' ,
384
377
containerElement : createElement ( "div" , {
385
378
marginLeft : "2px" ,
386
379
} ) ,
@@ -392,7 +385,7 @@ export const buttonContributions: ButtonContributionParams[] = [
392
385
exampleUrls : [
393
386
"https://bitbucket.org/efftinge/browser-extension-test/commits/"
394
387
] ,
395
- selector : 'xpath://*[@id="root"]/div[2] /div[3]/div/div/div[1]/div/div/div[1]/div[1]/div[2]/div' ,
388
+ selector : 'xpath://*[@id="root"]/div/div[3]/div/div/div[1]/div/div/div[1]/div[1]/div[2]/div' ,
396
389
containerElement : createElement ( "div" , {
397
390
marginLeft : "2px" ,
398
391
} ) ,
0 commit comments