Magical munging for IE Favorites and NetPositive (BeOS).

This commit is contained in:
rjc%netscape.com 1999-08-05 01:38:02 +00:00
Родитель 2eae3c61f7
Коммит 568ce9e5ee
2 изменённых файлов: 32 добавлений и 26 удалений

Просмотреть файл

@ -428,17 +428,19 @@
var url = node.getAttribute('id');
try
{
// first try asking RDF's graph for the URL
// add support for IE favorites under Win32, and NetPositive URLs under BeOS
if (url.indexOf("file://") == 0)
{
var rdf = Components.classes["component://netscape/rdf/rdf-service"].getService();
if (rdf) rdf = rdf.QueryInterface(Components.interfaces.nsIRDFService);
if (rdf)
{
var Bookmarks = rdf.GetDataSource("rdf:bookmarks");
if (Bookmarks)
var fileSys = rdf.GetDataSource("rdf:files");
if (fileSys)
{
var src = rdf.GetResource(url, true);
var prop = rdf.GetResource("http://home.netscape.com/NC-rdf#URL", true);
var target = Bookmarks.GetTarget(src, prop, true);
var target = fileSys.GetTarget(src, prop, true);
if (target) target = target.QueryInterface(Components.interfaces.nsIRDFLiteral);
if (target) target = target.Value;
if (target) url = target;
@ -446,6 +448,7 @@
}
}
}
}
catch(ex)
{
}

Просмотреть файл

@ -428,17 +428,19 @@
var url = node.getAttribute('id');
try
{
// first try asking RDF's graph for the URL
// add support for IE favorites under Win32, and NetPositive URLs under BeOS
if (url.indexOf("file://") == 0)
{
var rdf = Components.classes["component://netscape/rdf/rdf-service"].getService();
if (rdf) rdf = rdf.QueryInterface(Components.interfaces.nsIRDFService);
if (rdf)
{
var Bookmarks = rdf.GetDataSource("rdf:bookmarks");
if (Bookmarks)
var fileSys = rdf.GetDataSource("rdf:files");
if (fileSys)
{
var src = rdf.GetResource(url, true);
var prop = rdf.GetResource("http://home.netscape.com/NC-rdf#URL", true);
var target = Bookmarks.GetTarget(src, prop, true);
var target = fileSys.GetTarget(src, prop, true);
if (target) target = target.QueryInterface(Components.interfaces.nsIRDFLiteral);
if (target) target = target.Value;
if (target) url = target;
@ -446,6 +448,7 @@
}
}
}
}
catch(ex)
{
}