//Search bookmarks from Scuttle
makeSearchCommand({
name: "sbkm",
homepage: "http://zafiel.wingall.com/archives/200810220135313.php",
author: {name: "wIng", email: "trymmpro@gmail.com"},
url: "http://###SCUTTLE_URL###/search.php/all/{QUERY}", //Replace ###SCUTTLE_URL### to Scuttle URL
icon: "http://###SCUTTLE_URL###/icon.png", //Replace ###SCUTTLE_URL### to Scuttle URL
description: "Search Bookmarks from own Scuttle",
preview: function(pblock, directObject){
var searchUrl = this.url.replace("{QUERY}", directObject.text);
jQuery.get(
searchUrl,
null,
function(data){
var decoration = 'font-weight:bold;text-decoration:none;'; //CSS of TITLE var max = 8; //max counts of display
var fcolor = '#CCC'; //font color of tag and description
var fsize = '85%' //font size of tag and description (CSS)
var tempElement = CmdUtils.getHiddenWindow().document.createElement("div");
tempElement.innerHTML = data;
var all = jQuery(jQuery("#bookmarks",tempElement));
var num = jQuery(".link",all).size();
var source = [];
if(num != 0){
(num<=max)? cnt = num : cnt = max;
for(i=0;i
var li = jQuery(jQuery(".xfolkentry",all)).get()[i];
var link = jQuery(jQuery(".link",li)).html();
var des = jQuery(jQuery(".description",li)).html();
//get each tag
var tagobj = jQuery(jQuery("[rel*=tag]",li));
var tag = [];
for(d=0;d
tag.push(tagobj.get()[d].innerHTML);
}
//set each data
var list = '' + link + ' '
+ '';
if(des != null){
var list = list + des + ' '; //add description
}
var list = list + 'tag - ' + tag.join(', ') + '';
source.push(list);
}
pblock.innerHTML = source.join('