yosider
https://gyazo.com/627ad5fa7089af47308a85c9d82e448a
code:script.js
import '../../yosider-scripts/import/script.js';
import '../../yosider-scripts/scrapbox-exec-code/script.js';
code:style.css
@import '../../yosider-scripts/SharedUserCSS/style.css';
@import '../../yosider-scripts/UserCSS-light/style.css';
code:script.js
import {insertText} from "../../yosider-scripts/scrapbox-userscript-std-bundled/script.js";
const test = (fn) => {
document.addEventListener('keydown', (e) => {
if (e.altKey && !e.ctrlKey) {
if (e.code == 'KeyR') {
e.preventDefault();
fn();
}
}
});
}
test(() => {
insertText('A');
});
KeyboardEvent.codeはdeprecatedtakker.icon
KeyboardEvent.key推奨
$ e.key === 'r'