UserScript:ショートカットキー
code:script.js
$('body').on('keydown', function (e) {
if (e.target.tagName != "TEXTAREA" && e.target.tagName != "INPUT" && e.target.tagName != "A") {
if (e.key == 'r') {
document.getElementsByClassName('random-jump-button')0.click() }
}
});
code:script.js
$('body').on('keydown',function(e){ // Enterキーで新規ページ作成
if(e.target.tagName != "TEXTAREA" && e.target.tagName != "INPUT"){
if(e.key == 'Enter'){
var project = location.href.split('/')3; location.href = /${project}/new;
}
}
});
code:script.js
addEventListener('keydown', e => {
if (!e.metaKey || e.key !== 'i') return
$('#text-input').focus()
})
code:script.js
addEventListener('keydown', e => {
if (e.ctrlKey && e.key === 'j') {
document.getElementById('text-input').focus()
}
})
UserScript.icon
https://img.shields.io/badge/JavaScript-UserScript_ショートカットキー-F7DF1E.svg?logo=javascript&style=for-the-badge