mirror of
https://code.castopod.org/adaures/castopod.git
synced 2024-09-30 21:51:15 +02:00
b09acf6c65
remove console.logs + add @github/hotkey to replace markdown toolbar shortcuts
15 lines
335 B
TypeScript
15 lines
335 B
TypeScript
import { install } from "@github/hotkey";
|
|
|
|
const HotKeys = (): void => {
|
|
const hotkeys: NodeListOf<HTMLElement> =
|
|
document.querySelectorAll("[data-hotkey]");
|
|
|
|
// Install all the hotkeys on the page
|
|
for (let i = 0; i < hotkeys.length; i++) {
|
|
const hotkey = hotkeys[i];
|
|
install(hotkey);
|
|
}
|
|
};
|
|
|
|
export default HotKeys;
|