diff --git a/README.markdown b/README.markdown index 0d94b22..ab09730 100644 --- a/README.markdown +++ b/README.markdown @@ -17,7 +17,7 @@ Features - Use secure headers (only external images and Youtube/Vimeo videos are allowed) - Open external links inside a new tab with a `rel="noreferrer"` attribute - Mobile CSS (responsive design) -- Keyboard shortcuts +- Keyboard shortcuts (pressing '?' displays a pop-up listing the shortcuts; pressing 'q' closes it) - Basic bookmarks - Translated in English, French, German, Italian and Simplified Chinese - Themes @@ -211,4 +211,4 @@ It would be awesome for everybody :) - Line indentation: 4 spaces - Line endings: Unix -- File encoding: UTF-8 \ No newline at end of file +- File encoding: UTF-8 diff --git a/assets/css/app.css b/assets/css/app.css index 6d3ca67..f0a682e 100644 --- a/assets/css/app.css +++ b/assets/css/app.css @@ -216,6 +216,10 @@ textarea.form-error { margin-bottom: 15px; } +.invisible { + display:none; +} + /* alerts */ .alert { padding: 8px 35px 8px 14px; diff --git a/assets/js/app.js b/assets/js/app.js index a2f2b8b..2b8b718 100644 --- a/assets/js/app.js +++ b/assets/js/app.js @@ -477,6 +477,12 @@ case 108: // l open_next_page(); break; + case 63: // ? + var jsFile = document.URL.substr(0, document.URL.lastIndexOf('/') + 1) + "assets/js/popupHelp.js"; + var htmlHelp = document.getElementById("shortcuts").innerHTML; + var encodedHelp = "data:text/html;charset=utf-8," + htmlHelp; + var popup = open(encodedHelp, "Shortcuts", "width=300,height=300,location=no,scrollbars=no,status=no,toolbar=no"); + break; } }; diff --git a/assets/js/popupHelp.js b/assets/js/popupHelp.js new file mode 100644 index 0000000..b7727ef --- /dev/null +++ b/assets/js/popupHelp.js @@ -0,0 +1,10 @@ +document.title = "Keyboard Shortcuts"; + +document.onkeypress = function(e) { + switch (e.keyCode || e.which) { + case 81: // Q + case 113: // q + window.close(); + break; + } +}; diff --git a/locales/cs_CZ/translations.php b/locales/cs_CZ/translations.php index 197058c..4025599 100644 --- a/locales/cs_CZ/translations.php +++ b/locales/cs_CZ/translations.php @@ -105,5 +105,7 @@ return array( 'Do you really want to remove these items from your history?' => 'Opravdu chcete odstranit tyto články z historie?', 'Do you really want to remove this subscription: "%s"?' => 'Opravdu chcete odstranit tento odběr: "%s"?', 'Nothing to read, do you want to update your subscriptions?' => - 'Nic ke čtení, chete aktualizovat vaše odběry?' + 'Nic ke čtení, chete aktualizovat vaše odběry?', + 'Show shortcuts' => 'Ukázat zkratky', + 'Close shortcut list' => 'Zavřít seznam zkratek' ); diff --git a/locales/de_DE/translations.php b/locales/de_DE/translations.php index f86574d..5535181 100644 --- a/locales/de_DE/translations.php +++ b/locales/de_DE/translations.php @@ -101,5 +101,7 @@ return array( 'Do you really want to remove these items from your history?' => 'Willst du sicher alle Einträge aus dem Verlauf löschen?', 'Do you really want to remove this subscription: "%s"?' => 'Willst du dieses Abonnement wirklich löschen: "%s" ?', 'Nothing to read, do you want to update your subscriptions?' => - 'Nichts zu lesen, willst du alle Abonemments aktualisieren?' + 'Nichts zu lesen, willst du alle Abonemments aktualisieren?', + 'Show shortcuts' => 'Verknüpfungen anzeigen', + 'Close shortcut list' => 'Schließen Liste für Schnellzugriffe' ); diff --git a/locales/fr_FR/translations.php b/locales/fr_FR/translations.php index 4e6e5a4..65d08de 100644 --- a/locales/fr_FR/translations.php +++ b/locales/fr_FR/translations.php @@ -106,5 +106,7 @@ return array( 'Do you really want to remove these items from your history?' => 'Voulez-vous vraiment supprimer les éléments de votre historique ?', 'Do you really want to remove this subscription: "%s"?' => 'Voulez-vous vraiment supprimer cet abonnement : "%s" ?', 'Nothing to read, do you want to update your subscriptions?' => - 'Il n\'y a rien à lire, voulez-vous mettre à jour vos abonnements ?' + 'Il n\'y a rien à lire, voulez-vous mettre à jour vos abonnements ?', + 'Show shortcuts' => 'Afficher les raccourcis', + 'Close shortcut list' => 'Fermer la liste des raccourcis' ); diff --git a/locales/it_IT/translations.php b/locales/it_IT/translations.php index 38e6e7f..a419aa0 100644 --- a/locales/it_IT/translations.php +++ b/locales/it_IT/translations.php @@ -102,5 +102,7 @@ return array( 'Do you really want to remove these items from your history?' => 'Vuoi veramente cancellare questi articoli dalla cronologia?', 'Do you really want to remove this subscription: "%s"?' => 'Vuoi veramente cancellare la sottoscrizione a: "%s" ?', 'Nothing to read, do you want to update your subscriptions?' => - 'Niente da leggere, vuoi aggiornare tutte le sottoscrizioni?' + 'Niente da leggere, vuoi aggiornare tutte le sottoscrizioni?', + 'Show shortcuts' => 'Mostra tasti di scelta rapida', + 'Close shortcut list' => 'Ridurre la lista di scelta rapida' ); diff --git a/locales/zh_CN/translations.php b/locales/zh_CN/translations.php index ce0d429..c9dde04 100644 --- a/locales/zh_CN/translations.php +++ b/locales/zh_CN/translations.php @@ -101,5 +101,7 @@ return array( 'Do you really want to remove these items from your history?' => '你确认要移除这些历史记录吗?', 'Do you really want to remove this subscription: "%s"?' => '你确定要移除这个订阅源: "%s" ?', 'Nothing to read, do you want to update your subscriptions?' => - '空空如也,你想要更新订阅源嘛?' + '空空如也,你想要更新订阅源嘛?', + 'Show shortcuts' => '显示捷径', + 'Close shortcut list' => '关闭快捷键列表' ); diff --git a/templates/app_header.php b/templates/app_header.php index 6a2199f..675c5e0 100644 --- a/templates/app_header.php +++ b/templates/app_header.php @@ -42,3 +42,19 @@
%s') ?> %s') ?> + + diff --git a/templates/config.php b/templates/config.php index a1c9aec..6dc106d 100644 --- a/templates/config.php +++ b/templates/config.php @@ -45,7 +45,7 @@
  • -
    +

    • = p j
    • @@ -55,7 +55,9 @@
    • = o
    • = f
    • = h
    • -
    • = l
    • +
    • = l

    • +
    • = ?
    • +
    • = q