Skip to content

Instantly share code, notes, and snippets.

@petitviolet
Created June 25, 2014 03:15
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save petitviolet/121fe7701f30df2bfc59 to your computer and use it in GitHub Desktop.
Save petitviolet/121fe7701f30df2bfc59 to your computer and use it in GitHub Desktop.
hatena bookmark search by tags from vimperator
(function() {
liberator.modules.commands.addUserCommand(
["hatenaTag[bookmark]", "ht"],
"search from hatena bookmarks by tags",
function(args){
if (args.length === 0) {
liberator.echo('input a query!');
return false;
}
// make "and" query
var query = args.join("+");
var hatenaTagUrl = 'http://b.hatena.ne.jp/search/tag?safe=on&sort=recent&q='
// open in a new tab
liberator.open(hatenaTagUrl + 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