Skip to content

Commit f48983c

Browse files
committed
Update button-contributions-copy.ts
1 parent bbe9531 commit f48983c

1 file changed

Lines changed: 6 additions & 19 deletions

File tree

test/src/button-contributions-copy.ts

Lines changed: 6 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -232,15 +232,15 @@ export const buttonContributions: ButtonContributionParams[] = [
232232
id: "gl-merge-request",
233233
exampleUrls: ["https://gitlab.com/svenefftinge/browser-extension-test/-/merge_requests/1"],
234234
match: /\/merge_requests\//,
235-
selector: "body[data-project-id] div.detail-page-header-actions.is-merge-request > div",
236-
containerElement: createElement("div", { marginLeft: "8px", marginRight: "-8px" }),
235+
selector: "#content-body > div.merge-request .js-issuable-actions",
236+
containerElement: createElement("div", {}),
237237
application: "gitlab",
238-
insertBefore: "body[data-project-id] div.detail-page-header-actions.is-merge-request > div > div",
238+
insertBefore: "#content-body > div.merge-request .js-issuable-actions > div.dropdown.gl-dropdown",
239239
manipulations: [
240240
{
241241
// make the clone button secondary
242242
element:
243-
"#content-body > div.merge-request > div.detail-page-header.border-bottom-0.gl-display-block.gl-pt-5.gl-sm-display-flex\\!.is-merge-request > div.detail-page-header-actions.gl-align-self-start.is-merge-request.js-issuable-actions.gl-display-flex > div > div.gl-sm-ml-3.dropdown.gl-dropdown > button",
243+
"#content-body > div.merge-request .js-issuable-actions > div.dropdown.gl-dropdown > button",
244244
remove: "btn-confirm",
245245
},
246246
],
@@ -249,23 +249,10 @@ export const buttonContributions: ButtonContributionParams[] = [
249249
id: "gl-issue",
250250
exampleUrls: ["https://gitlab.com/svenefftinge/browser-extension-test/-/issues/1"],
251251
match: /\/issues\//,
252-
selector:
253-
"#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-flex.gl-items-start.gl-flex-col.md\\:gl-flex-row.gl-gap-3.gl-pt-3 > div",
252+
selector: "xpath://*[@id='content-body']/div[2]/div/section/section/div[2]/div[1]/div[2]",
254253
containerElement: createElement("div", { marginLeft: "0", marginRight: "0px" }),
255254
application: "gitlab",
256-
insertBefore: "#new-actions-header-dropdown",
257-
manipulations: [
258-
{
259-
element:
260-
"#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.js-issue-widgets > div > div > div.new-branch-col.gl-font-size-0.gl-my-2 > div > div.btn-group.available > button.gl-button.btn.btn-md.btn-confirm.js-create-merge-request",
261-
remove: "btn-confirm",
262-
},
263-
{
264-
element:
265-
"#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.js-issue-widgets > div > div > div.new-branch-col.gl-font-size-0.gl-my-2 > div > div.btn-group.available > button.gl-button.btn.btn-icon.btn-md.btn-confirm.js-dropdown-toggle.dropdown-toggle.create-merge-request-dropdown-toggle",
266-
remove: "btn-confirm",
267-
},
268-
],
255+
insertBefore: "xpath://*[@id='content-body']/div[2]/div/section/section/div[2]/div[1]/div[2]/div",
269256
},
270257

271258
// GitHub

0 commit comments

Comments
 (0)