зеркало из https://github.com/mozilla/pjs.git
Magical munging for IE Favorites and NetPositive (BeOS).
This commit is contained in:
Родитель
2eae3c61f7
Коммит
568ce9e5ee
|
@ -428,21 +428,24 @@
|
||||||
var url = node.getAttribute('id');
|
var url = node.getAttribute('id');
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
// first try asking RDF's graph for the URL
|
// add support for IE favorites under Win32, and NetPositive URLs under BeOS
|
||||||
var rdf = Components.classes["component://netscape/rdf/rdf-service"].getService();
|
if (url.indexOf("file://") == 0)
|
||||||
if (rdf) rdf = rdf.QueryInterface(Components.interfaces.nsIRDFService);
|
|
||||||
if (rdf)
|
|
||||||
{
|
{
|
||||||
var Bookmarks = rdf.GetDataSource("rdf:bookmarks");
|
var rdf = Components.classes["component://netscape/rdf/rdf-service"].getService();
|
||||||
if (Bookmarks)
|
if (rdf) rdf = rdf.QueryInterface(Components.interfaces.nsIRDFService);
|
||||||
|
if (rdf)
|
||||||
{
|
{
|
||||||
var src = rdf.GetResource(url, true);
|
var fileSys = rdf.GetDataSource("rdf:files");
|
||||||
var prop = rdf.GetResource("http://home.netscape.com/NC-rdf#URL", true);
|
if (fileSys)
|
||||||
var target = Bookmarks.GetTarget(src, prop, true);
|
{
|
||||||
if (target) target = target.QueryInterface(Components.interfaces.nsIRDFLiteral);
|
var src = rdf.GetResource(url, true);
|
||||||
if (target) target = target.Value;
|
var prop = rdf.GetResource("http://home.netscape.com/NC-rdf#URL", true);
|
||||||
if (target) url = target;
|
var target = fileSys.GetTarget(src, prop, true);
|
||||||
|
if (target) target = target.QueryInterface(Components.interfaces.nsIRDFLiteral);
|
||||||
|
if (target) target = target.Value;
|
||||||
|
if (target) url = target;
|
||||||
|
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -428,21 +428,24 @@
|
||||||
var url = node.getAttribute('id');
|
var url = node.getAttribute('id');
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
// first try asking RDF's graph for the URL
|
// add support for IE favorites under Win32, and NetPositive URLs under BeOS
|
||||||
var rdf = Components.classes["component://netscape/rdf/rdf-service"].getService();
|
if (url.indexOf("file://") == 0)
|
||||||
if (rdf) rdf = rdf.QueryInterface(Components.interfaces.nsIRDFService);
|
|
||||||
if (rdf)
|
|
||||||
{
|
{
|
||||||
var Bookmarks = rdf.GetDataSource("rdf:bookmarks");
|
var rdf = Components.classes["component://netscape/rdf/rdf-service"].getService();
|
||||||
if (Bookmarks)
|
if (rdf) rdf = rdf.QueryInterface(Components.interfaces.nsIRDFService);
|
||||||
|
if (rdf)
|
||||||
{
|
{
|
||||||
var src = rdf.GetResource(url, true);
|
var fileSys = rdf.GetDataSource("rdf:files");
|
||||||
var prop = rdf.GetResource("http://home.netscape.com/NC-rdf#URL", true);
|
if (fileSys)
|
||||||
var target = Bookmarks.GetTarget(src, prop, true);
|
{
|
||||||
if (target) target = target.QueryInterface(Components.interfaces.nsIRDFLiteral);
|
var src = rdf.GetResource(url, true);
|
||||||
if (target) target = target.Value;
|
var prop = rdf.GetResource("http://home.netscape.com/NC-rdf#URL", true);
|
||||||
if (target) url = target;
|
var target = fileSys.GetTarget(src, prop, true);
|
||||||
|
if (target) target = target.QueryInterface(Components.interfaces.nsIRDFLiteral);
|
||||||
|
if (target) target = target.Value;
|
||||||
|
if (target) url = target;
|
||||||
|
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Загрузка…
Ссылка в новой задаче