miniflux-legacy/assets/js/popupHelp.js
James Scott-Brown eaa44052fd Provide pop-up lisitng keyboard shortcuts
Pressing the question-mark key (?) produces a pop-up listing the
keyboard shortcuts. Pressing q whilst this window has focus closes it.

I've provided crude translations for the additional ? and q shortcuts,
obtained from Google Translate, but they should be checked by native
speakers.
2013-07-17 22:16:07 +01:00

11 lines
199 B
JavaScript

document.title = "Keyboard Shortcuts";
document.onkeypress = function(e) {
switch (e.keyCode || e.which) {
case 81: // Q
case 113: // q
window.close();
break;
}
};