blob: 6bf381630f59b5532d1e5292f95af3ee6df5238d (
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
|
import React from 'dom-chef';
import select from 'select-dom';
import * as pageDetect from 'github-url-detection';
import {wrap} from '../libs/dom-utils';
import features from '../libs/features';
function init(): void | false {
const mode = select('.file-mode');
if (mode && mode.textContent === 'symbolic link') {
const line = select('.js-file-line')!;
wrap(line.firstChild!, <a href={line.textContent!}/>);
}
}
features.add({
id: __filebasename,
description: 'Linkifies symbolic links files.',
screenshot: 'https://user-images.githubusercontent.com/1402241/62036664-6d0e6880-b21c-11e9-9270-4ae30cc10de2.png'
}, {
include: [
pageDetect.isSingleFile
],
init
});
|