]> cat aescling's git repositories - mastodon.git/blob - app/javascript/mastodon/load_keyboard_extensions.js
Slightly reorder three dots menu on toots to make it more intuitive (#15647)
[mastodon.git] / app / javascript / mastodon / load_keyboard_extensions.js
1 // On KaiOS, we may not be able to use a mouse cursor or navigate using Tab-based focus, so we install
2 // special left/right focus navigation keyboard listeners, at least on public pages (i.e. so folks
3 // can at least log in using KaiOS devices).
4
5 function importArrowKeyNavigation() {
6 return import(/* webpackChunkName: "arrow-key-navigation" */ 'arrow-key-navigation');
7 }
8
9 export default function loadKeyboardExtensions() {
10 if (/KAIOS/.test(navigator.userAgent)) {
11 return importArrowKeyNavigation().then(arrowKeyNav => {
12 arrowKeyNav.register();
13 });
14 }
15 return Promise.resolve();
16 }
This page took 0.087841 seconds and 5 git commands to generate.