rem: if ((event.button != 1) || (event.detail != mClickCount)) return(false);  if (treeitem.getAttribute("container") == "true") return(false);  if (treeitem.getAttribute("type") == "http: return(false);  var id = treeitem.id; if (!id) return(false);    try { var theRootNode = document.getElementById(root); var ds = null; if (rootNode) { ds = theRootNode.database; }  var rdf = nsJSComponentManager.getService(RDFSERVICE_CONTRACTID, "nsIRDFService"); if (rdf) { if (ds) { var src = rdf.GetResource(id, true); var prop = rdf.GetResource("http: var target = ds.GetTarget(src, prop, true); if (target)	target = target.QueryInterface(nsIRDFLiteral); if (target)	target = target.Value; if (target)	id = target; } } } catch(ex) { }  
add:   try { var ds = document.getElementById("Tree").database; if (ds) { var rdf = Components.classes[RDFSERVICE_CONTRACTID].getService(nsIRDFService); var src = rdf.GetResource(id, true); var prop = rdf.GetResource("http: var target = ds.GetTarget(src, prop, true); if (target) { target = target.QueryInterface(nsIRDFLiteral).Value; if (target) id = target; } } } catch (ex) { } 
context: function sidebarOpenURL(event, treeitem, root){  if (event.target.localName != "treecell")  //make sure they clicked on a real cell    return false;  mClickCount = nsPreferences.getBoolPref("browser.search.use_double_clicks", false) ? 2 : 1;  if ((event.button != 1) || (event.detail != mClickCount))		return(false);	if (treeitem.getAttribute("container") == "true")		return(false);	if (treeitem.getAttribute("type") == "http://home.netscape.com/NC-rdf#BookmarkSeparator")		return(false);	var id = treeitem.id;	if (!id)		return(false);	// rjc: add support for anonymous resources; if the node has	// a "#URL" property, use it, otherwise default to using the id	try	{		var theRootNode = document.getElementById(root);		var ds = null;		if (rootNode)		{			ds = theRootNode.database;		}        var rdf = nsJSComponentManager.getService(RDFSERVICE_CONTRACTID, "nsIRDFService");		if (rdf)		{			if (ds)			{				var src = rdf.GetResource(id, true);				var prop = rdf.GetResource("http://home.netscape.com/NC-rdf#URL", true);				var target = ds.GetTarget(src, prop, true);				if (target)	target = target.QueryInterface(nsIRDFLiteral);				if (target)	target = target.Value;				if (target)	id = target;			}		}	}	catch(ex)	{	}  loadURLInContent(id);}
meta: 9421	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/9421/c837d8cd69e2d1c5d2619fe01ec4c3979b2e5f7e/search-panel.js/buggy/suite/common/search/search-panel.js