blob: d28ddceb87a28b4c68f0de20f6f5467fe5c86dc7 (
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
|
import select from 'select-dom';
import features from '../libs/features';
function init(): void {
const createNextPageButton = select('a.next_page');
if (createNextPageButton) {
createNextPageButton.setAttribute('data-hotkey', 'ArrowRight');
}
const createPreviousPageButton = select('a.previous_page');
if (createPreviousPageButton) {
createPreviousPageButton.setAttribute('data-hotkey', 'ArrowLeft');
}
}
features.add({
id: __featureName__,
description: 'Adds shortcuts to navigate through pages with pagination: `←` and `→`.',
screenshot: false,
load: features.onAjaxedPages,
shortcuts: {
'→': 'Go to the next page',
'←': 'Go to the previous page'
},
init
});
|