hr.iconをショートカットキーで挿入できるようにするUserScript
Ctrl+lを押下したときに[/icons/hr.icon]が挿入されるようにするUserScript code:script.js
document.addEventListener('keydown', e => {
if (e.ctrlKey && e.key === 'l') {
document.execCommand('insertText', null, '/icons/hr.icon')
}
});
元ネタ
code:original.js
document.addEventListener('keydown', e => {
if (e.altKey && e.key === '-') {
document.execCommand('insertText', null, '/icons/hr.icon')
}
});
Ctrl-lを使うようにした