blob: d33ffdcaf1781a0f21aa2a3e75342cc6b6d25410 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
|
import React from 'dom-chef';
import select from 'select-dom';
import * as pageDetect from 'github-url-detection';
import {wrap} from '../helpers/dom-utils.js';
import features from '../feature-manager.js';
function init(): void {
const element = select('.sha.user-select-contain:not(a *)');
if (element) {
wrap(element, <a href={location.pathname.replace(/pull\/\d+\/commits/, 'commit')}/>);
}
}
void features.add(import.meta.url, {
include: [
pageDetect.isPRCommit,
],
awaitDomReady: true,
init,
});
|