Fix up some search aliases

This commit is contained in:
Tom Willemse 2024-04-07 00:22:14 -07:00
parent 7fd1612575
commit 71aa62b6c9

View file

@ -7,8 +7,21 @@ function orgCapture() {
body: window.getSelection()}); 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('<Alt-x>', '#7Open commands', function() { api.mapkey('<Alt-x>', '#7Open commands', function() {
api.Front.openOmnibar({type: "Commands"}); api.Front.openOmnibar({type: "Commands"});
}); });