diff --git a/surfingkeys/surfingkeys.js b/surfingkeys/surfingkeys.js index fd0eed9..65aa463 100644 --- a/surfingkeys/surfingkeys.js +++ b/surfingkeys/surfingkeys.js @@ -7,8 +7,21 @@ function orgCapture() { body: window.getSelection()}); } -api.unmap(':'); +api.addSearchAlias('aw', 'archlinux wiki', 'https://wiki.archlinux.org/index.php?search=%s'); +api.removeSearchAlias('e'); +api.addSearchAlias( + 'w', + 'wikipedia', + 'https://en.wikipedia.org/wiki/', + 's', + 'https://en.wikipedia.org/w/api.php?action=opensearch&format=json&formatversion=2&namespace=0&limit=40&search=', + function(response) { + return JSON.parse(response.text)[1]; + } +); + +api.unmap(':'); api.mapkey('', '#7Open commands', function() { api.Front.openOmnibar({type: "Commands"}); });