[surfingkeys] Add command to capture the current page in org-mode
This commit is contained in:
parent
34c3fbdec8
commit
af77f610b6
1 changed files with 11 additions and 0 deletions
|
@ -1,9 +1,20 @@
|
|||
function orgCapture() {
|
||||
location.href = 'org-protocol://capture?'
|
||||
+ new URLSearchParams({
|
||||
template: 'U',
|
||||
url: window.location.href,
|
||||
title: document.title,
|
||||
body: window.getSelection()});
|
||||
}
|
||||
|
||||
api.unmap(':');
|
||||
|
||||
api.mapkey('<Alt-x>', '#7Open commands', function() {
|
||||
api.Front.openOmnibar({type: "Commands"});
|
||||
});
|
||||
|
||||
api.mapkey('cc', '#13Capture current page', orgCapture);
|
||||
|
||||
api.map('<Ctrl-b>', 'h');
|
||||
api.map('<Ctrl-n>', 'j');
|
||||
api.map('<Ctrl-p>', 'k');
|
||||
|
|
Loading…
Reference in a new issue