blob: b967e70ac89deb040f51a22d9d788a3889dcfc25 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
|
import React from 'dom-chef';
import select from 'select-dom';
import * as pageDetect from 'github-url-detection';
import features from '../feature-manager.js';
function init(): false | void {
const originalPreviousNext = select('.commit .BtnGroup.float-right');
if (!originalPreviousNext) {
return false;
}
// Wrap the button in a <div> to avoid #4503
select('#files')!.after(
<div className="d-flex flex-justify-end mb-3">
{originalPreviousNext.cloneNode(true)}
</div>,
);
}
void features.add(import.meta.url, {
include: [
pageDetect.isPRFiles,
pageDetect.isPRCommit,
],
deduplicate: 'has-rgh-inner',
awaitDomReady: true,
init,
});
|