משתמש:Idoiz/ChecktyBind.js
מראה
הערה: לאחר הפרסום, ייתכן שיהיה צורך לנקות את זיכרון המטמון (cache) של הדפדפן כדי להבחין בשינויים.
- פיירפוקס / ספארי: להחזיק את המקש Shift בעת לחיצה על טעינה מחדש (Reload) או ללחוץ על צירוף המקשים Ctrl-F5 או Ctrl-R (במחשב מק: ⌘-R).
- גוגל כרום: ללחוץ על צירוף המקשים Ctrl-Shift-R (במחשב מק: ⌘-Shift-R).
- אדג': להחזיק את המקש Ctrl בעת לחיצה על רענן (Refresh) או ללחוץ על צירוף המקשים Ctrl-F5.
// Define the shortcut keys
const checkToolShortcutKeys = ['q', '/']; // The keys for the combinations
// Function to click the element
function clickCheckToolButton() {
// Use getElementById to find the element by its id
const element = document.getElementById('btnCheckTool');
if (element) {
element.querySelector('button').click();
}
}
// Event listener for keydown event
document.addEventListener('keydown', (event) => {
if (event.shiftKey && checkToolShortcutKeys.includes(event.key.toLowerCase())) {
clickCheckToolButton();
}
});