blob: 24df9dd324d8b077a0c417e06cddc291822d0693 (
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
30
31
32
|
import './clean-rich-text-editor.css';
import select from 'select-dom';
import features from '../libs/features';
import * as pageDetect from '../libs/page-detect';
function hideButtons(): void {
document.body.classList.add('rgh-clean-rich-text-editor');
}
function hideTextareaTooltip(): void {
for (const textarea of select.all('.comment-form-textarea')) {
textarea.title = '';
}
}
features.add({
id: __filebasename,
description: 'Hides unnecessary comment field tooltips and toolbar items.',
screenshot: 'https://user-images.githubusercontent.com/1402241/53629083-a4fe8900-3c47-11e9-8211-bfe2d254ffcb.png'
}, {
include: [
pageDetect.hasRichTextEditor
],
init: hideTextareaTooltip
}, {
include: [
pageDetect.isRepo
],
waitForDomReady: false,
repeatOnAjax: false,
init: hideButtons
});
|