mirror of
https://github.com/viq/NewsBlur.git
synced 2025-08-05 16:49:45 +00:00
Adding in x keyboard shortcut for expanding and collapsing a story.
This commit is contained in:
parent
78e2e399dd
commit
ab39fe7564
2 changed files with 21 additions and 2 deletions
|
@ -5491,6 +5491,15 @@
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
$document.bind('keydown', 'x', function(e) {
|
$document.bind('keydown', 'x', function(e) {
|
||||||
|
e.preventDefault();
|
||||||
|
var story = NEWSBLUR.reader.active_story;
|
||||||
|
if (story && story.get('selected')) {
|
||||||
|
NEWSBLUR.reader.active_story.story_title_view.collapse_story();
|
||||||
|
} else if (story && !story.get('selected')) {
|
||||||
|
NEWSBLUR.reader.active_story.set('selected', true);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
$document.bind('keydown', 'shift+x', function(e) {
|
||||||
e.preventDefault();
|
e.preventDefault();
|
||||||
NEWSBLUR.reader.active_story.story_view.expand_story();
|
NEWSBLUR.reader.active_story.story_view.expand_story();
|
||||||
});
|
});
|
||||||
|
|
|
@ -233,13 +233,15 @@ _.extend(NEWSBLUR.ReaderKeyboard.prototype, {
|
||||||
$.make('div', { className: 'NB-keyboard-shortcut' }, [
|
$.make('div', { className: 'NB-keyboard-shortcut' }, [
|
||||||
$.make('div', { className: 'NB-keyboard-shortcut-explanation' }, 'Expand story'),
|
$.make('div', { className: 'NB-keyboard-shortcut-explanation' }, 'Expand story'),
|
||||||
$.make('div', { className: 'NB-keyboard-shortcut-key' }, [
|
$.make('div', { className: 'NB-keyboard-shortcut-key' }, [
|
||||||
|
'shift',
|
||||||
|
$.make('span','+'),
|
||||||
'x'
|
'x'
|
||||||
])
|
])
|
||||||
]),
|
]),
|
||||||
$.make('div', { className: 'NB-keyboard-shortcut NB-last' }, [
|
$.make('div', { className: 'NB-keyboard-shortcut NB-last' }, [
|
||||||
$.make('div', { className: 'NB-keyboard-shortcut-explanation' }, 'Scroll to comments'),
|
$.make('div', { className: 'NB-keyboard-shortcut-explanation' }, 'Collapse story'),
|
||||||
$.make('div', { className: 'NB-keyboard-shortcut-key' }, [
|
$.make('div', { className: 'NB-keyboard-shortcut-key' }, [
|
||||||
'c'
|
'x'
|
||||||
])
|
])
|
||||||
])
|
])
|
||||||
]),
|
]),
|
||||||
|
@ -311,6 +313,14 @@ _.extend(NEWSBLUR.ReaderKeyboard.prototype, {
|
||||||
'f'
|
'f'
|
||||||
])
|
])
|
||||||
])
|
])
|
||||||
|
]),
|
||||||
|
$.make('div', { className: 'NB-keyboard-group' }, [
|
||||||
|
$.make('div', { className: 'NB-keyboard-shortcut' }, [
|
||||||
|
$.make('div', { className: 'NB-keyboard-shortcut-explanation' }, 'Scroll to comments'),
|
||||||
|
$.make('div', { className: 'NB-keyboard-shortcut-key' }, [
|
||||||
|
'c'
|
||||||
|
])
|
||||||
|
])
|
||||||
])
|
])
|
||||||
]);
|
]);
|
||||||
},
|
},
|
||||||
|
|
Loading…
Add table
Reference in a new issue