Created
June 30, 2014 09:26
-
-
Save petitviolet/16c5b4523dab7af6a2ec to your computer and use it in GitHub Desktop.
Youtube search from vimperator
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(function() { | |
liberator.modules.commands.addUserCommand( | |
["youtube"], | |
"search from youtube", | |
function(args){ | |
if (args.length === 0) { | |
liberator.echo('input a query!'); | |
return false; | |
} | |
// make "and" query | |
var query = args.join("+"); | |
var youtubeUrl = 'https://www.youtube.com/results?search_query=' | |
// open in a new tab | |
liberator.open(youtubeUrl + query, liberator.NEW_TAB); | |
return false; | |
}, | |
{}, | |
true | |
); | |
})(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment