Merge branch 'master' of https://github.com/chrislemonier/miniflux
This commit is contained in:
commit
a221fdbf8b
106
assets/js/app.js
106
assets/js/app.js
@ -3,6 +3,8 @@
|
|||||||
var feeds = [];
|
var feeds = [];
|
||||||
var queue = [];
|
var queue = [];
|
||||||
var queue_length = 5;
|
var queue_length = 5;
|
||||||
|
var keyqueue = [];
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
function download_item()
|
function download_item()
|
||||||
@ -538,41 +540,75 @@
|
|||||||
};
|
};
|
||||||
|
|
||||||
document.onkeypress = function(e) {
|
document.onkeypress = function(e) {
|
||||||
|
keyqueue.push(e.keyCode);
|
||||||
switch (e.keyCode || e.which) {
|
if (keyqueue[0]==103)
|
||||||
case 100: // d
|
{
|
||||||
download_item();
|
switch (keyqueue[1]) {
|
||||||
break;
|
case undefined:
|
||||||
case 112: // p
|
break;
|
||||||
case 107: // k
|
case 117: //u
|
||||||
open_previous_item();
|
window.location.href = "?action=unread";
|
||||||
break;
|
keyqueue = [];
|
||||||
case 110: // n
|
break;
|
||||||
case 106: // j
|
case 98: //b
|
||||||
open_next_item();
|
window.location.href = "?action=bookmarks";
|
||||||
break;
|
keyqueue = [];
|
||||||
case 118: // v
|
break;
|
||||||
open_original_item();
|
case 104: //h
|
||||||
break;
|
window.location.href = "?action=history";
|
||||||
case 111: // o
|
keyqueue = [];
|
||||||
open_item();
|
break;
|
||||||
break;
|
case 115: //s
|
||||||
case 109: // m
|
window.location.href = "?action=feeds";
|
||||||
change_item_status();
|
keyqueue = [];
|
||||||
break;
|
break;
|
||||||
case 102: // f
|
case 112: //p
|
||||||
bookmark_item();
|
window.location.href = "?action=config";
|
||||||
break;
|
keyqueue = [];
|
||||||
case 104: // h
|
break;
|
||||||
open_previous_page();
|
default:
|
||||||
break
|
keyqueue = [];
|
||||||
case 108: // l
|
break;
|
||||||
open_next_page();
|
}
|
||||||
break;
|
}
|
||||||
case 63: // ?
|
else
|
||||||
open("?action=show-help", "Help", "width=320,height=400,location=no,scrollbars=no,status=no,toolbar=no");
|
{
|
||||||
break;
|
keyqueue = [];
|
||||||
}
|
switch (e.keyCode || e.which) {
|
||||||
|
case 100: // d
|
||||||
|
download_item();
|
||||||
|
break;
|
||||||
|
case 112: // p
|
||||||
|
case 107: // k
|
||||||
|
open_previous_item();
|
||||||
|
break;
|
||||||
|
case 110: // n
|
||||||
|
case 106: // j
|
||||||
|
open_next_item();
|
||||||
|
break;
|
||||||
|
case 118: // v
|
||||||
|
open_original_item();
|
||||||
|
break;
|
||||||
|
case 111: // o
|
||||||
|
open_item();
|
||||||
|
break;
|
||||||
|
case 109: // m
|
||||||
|
change_item_status();
|
||||||
|
break;
|
||||||
|
case 102: // f
|
||||||
|
bookmark_item();
|
||||||
|
break;
|
||||||
|
case 104: // h
|
||||||
|
open_previous_page();
|
||||||
|
break
|
||||||
|
case 108: // l
|
||||||
|
open_next_page();
|
||||||
|
break;
|
||||||
|
case 63: // ?
|
||||||
|
open("?action=show-help", "Help", "width=320,height=450,location=no,scrollbars=no,status=no,toolbar=no");
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
})();
|
})();
|
||||||
|
@ -1,6 +1,11 @@
|
|||||||
<div class="alert alert-normal" id="shortcuts">
|
<div class="alert alert-normal" id="shortcuts">
|
||||||
<h3><?= t('Keyboard shortcuts') ?></h3>
|
<h3><?= t('Keyboard shortcuts') ?></h3>
|
||||||
<ul>
|
<ul>
|
||||||
|
<li><?= t('Go to unread') ?> = <strong>gu</strong></li>
|
||||||
|
<li><?= t('Go to bookmarks') ?> = <strong>gb</strong></li>
|
||||||
|
<li><?= t('Go to history') ?> = <strong>gh</strong></li>
|
||||||
|
<li><?= t('Go to subscriptions') ?> = <strong>gs</strong></li>
|
||||||
|
<li><?= t('Go to preferences') ?> = <strong>gp</strong></li>
|
||||||
<li><?= t('Download content') ?> = <strong>d</strong></li>
|
<li><?= t('Download content') ?> = <strong>d</strong></li>
|
||||||
<li><?= t('Previous item') ?> = <strong>p</strong> <?= t('or') ?> <strong>j</strong></li>
|
<li><?= t('Previous item') ?> = <strong>p</strong> <?= t('or') ?> <strong>j</strong></li>
|
||||||
<li><?= t('Next item') ?> = <strong>n</strong> <?= t('or') ?> <strong>k</strong></li>
|
<li><?= t('Next item') ?> = <strong>n</strong> <?= t('or') ?> <strong>k</strong></li>
|
||||||
|
Loading…
Reference in New Issue
Block a user