"Search with Selection" with chosen search engine?
-
Hi,
There is a keyboard shortcut for "Search with Selection" which works with default search engine.
Is it possible to make a shortcut for specific search engine?Thanks!
Edit:
It seems this will do it:
https://forum.vivaldi.net/topic/63828/command-chain-recipes/11 -
@chimeralove
Use the command chain.Open Link In Current Tab
Parameter: javascript:(function(){var b=((window.getSelection&&window.getSelection())||(document.getSelection&&document.getSelection())||(document.selection&&document.selection.createRange&&document.selection.createRange().text));if(b!=''){window.open('https://en.wikipedia.org/wiki/'+encodeURIComponent(b)+'');}else{alert('You have not selected text.');}})();Replace "https://en.wikipedia.org/wiki/" to URL you need.
-
@shifte Thanks!
Do you know how to use the search engine format like this:
https://translate.google.com/?sl=auto&tl=iw&text=%s &op=translate
That the %s is the selected text?I did a quick command to search and tile two search engines:
https://forum.vivaldi.net/topic/63828/command-chain-recipes/18So I'll edit it with your more minimalistic suggestion.
-
-
@paul1149 said in "Search with Selection" with chosen search engine?:
There's also this:
https://chrome.google.com/webstore/detail/selection-search/gipnlpdeieaidmmeaichnddnmjmcakoe
Thanks you! but I was hoping to do it with a keyboard shortcut and with more complex searches that can be done with Vivaldi.
-
@chimeralove
Open Link In Current Tab
Parameter:
javascript:(function(){var b=((window.getSelection&&window.getSelection())||(document.getSelection&&document.getSelection())||(document.selection&&document.selection.createRange&&document.selection.createRange().text));if(b!=''){window.open('https://translate.google.com/?sl=auto&tl=iw&text='+encodeURIComponent(b)+' &op=translate');}else{alert('You have not selected text.');}})(); -
@shifte Thank you
I made a quick action with it here:
https://forum.vivaldi.net/topic/63828/command-chain-recipes/21 -