Retrospring/app/javascript/retrospring/initializers/hotkey.ts

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

8 lines
225 B
TypeScript
Raw Normal View History

2023-02-07 14:57:36 -08:00
import { install } from '@github/hotkey'
export default function (): void {
document.addEventListener('turbo:load', () => {
document.querySelectorAll('[data-hotkey]').forEach(el => install(el as HTMLElement));
});
}