I'd like to add a pentadactyl (it's a fork of vimperator) command to search btdigg torrent search engine. The query structure is shown in the example below - where "test with space" is searched:
http://btdigg.org/search?q=test+with+space
I tried to execute:
:command -nargs=* btdigg open http://btdigg.org/search?q= <args>
It brings me to the title page what ever I give it. So it doesn't work. Can You fix it? I want to the following command
:btdigg arg1 arg2 arg3
to search "arg1 arg2 arg3" string in www.btdigg.org
Edit:
So here's my best try. It's a javascript code to search a given site(s). If I could make it work - the problem with btdigg will also be solved:
javascript <<EOF
dactyl.searchWikis = function (selection) {
let parsedSelection = selection.replace(/^\s*/, "" ).replace(/\s*$/, "" ).replace(/\s+/g, "+" );
dactyl.execute( ":tabopen http://www.scholarpedia.org/wiki/index.php?title=Special:Search&search=" + selection);
dactyl.execute( ":tabopen http://en.citizendium.org/wiki?title=Special:Search&search=" + selection);
};
EOF
:command bookSearch -nargs=* -js dactyl.searchWikis(<args>)
But PentaDactyl doesn't see it. Can You please make Pentadactyl see it?
Get the add-to-search-bar addon, then right-click on the btdigg's search bar and choose "Add to search bar". Say You'll name it
btdigg
, After that:would search "arg1 arg2 arg3" in btdigg.