This file contains 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
CmdUtils.makeSearchCommand({ | |
name: "scholar-search", | |
url: "http://scholar.google.com/scholar?q={QUERY}", | |
icon: "http://www.google.com/favicon.ico", | |
description: "Searches Google Scholar for your words.", | |
preview: function(pblock, directObject) { | |
var searchTerm = directObject.text; | |
var pTemplate = "Searches Google Scholar for <b>${query}</b>"; | |
var pData = {query: searchTerm}; | |
pblock.innerHTML = CmdUtils.renderTemplate(pTemplate, pData); |
This file contains 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
douban_search_num_html = "<div><b>${num}</b> douban items found matching <b>${term}</b>.</div><br/>"; | |
douban_search_item_html = "<div style=\"clear: both;\"><b><u><a href=\"${item.link[1][\"@href\"]}\">${item.title[\"$t\"]}</a></u></b><br/>" + | |
"<img src=\"${item.link[2][\"@href\"]}\" style=\"float: left; height: 80px; background-color: white;\" />" + | |
"{for aut in item.author}<small>${aut.name[\"$t\"]}.</small>{/for}" + | |
"{for db in item[\"db:attribute\"]}<small>${db[\"$t\"]}.</small>{/for}" + | |
"</div><br/>"; | |
douban_search_item_no_img_html = "<div style=\"clear: both;\"><b><u><a href=\"${item.link[1][\"@href\"]}\">${item.title[\"$t\"]}</a></u></b><br/>" + | |
"{for aut in item.author}<small>${aut.name[\"$t\"]}.</small>{/for}" + | |
"{for db in item[\"db:attribute\"]}<small>${db[\"$t\"]}.</small>{/for}" + | |
"</div><br/>"; |