home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
PC World 2006 December
/
PCWorld_2006-12_cd.bin
/
komunikace
/
netscape
/
nsb-install-8-1-2.exe
/
chrome
/
browser.jar
/
content
/
browser
/
trustPartners.xul
< prev
next >
Wrap
Extensible Markup Language
|
2006-01-06
|
3KB
|
84 lines
<?xml version="1.0"?>
<?xml-stylesheet href="chrome://global/skin/global.css" type="text/css"?>
<?xml-stylesheet href="chrome://global/skin/dialog.css" type="text/css"?>
<!DOCTYPE dialog [
<!ENTITY % turboDialogDTD SYSTEM "chrome://browser/locale/turboDialog.dtd" >
%turboDialogDTD;
<!ENTITY % dialogOverlayDTD SYSTEM "chrome://global-platform/locale/platformDialogOverlay.dtd" >
%dialogOverlayDTD;
<!ENTITY % brandDTD SYSTEM "chrome://global/locale/brand.dtd" >
%brandDTD;
]>
<dialog id="trustPartnersDialog" buttons="accept" buttonpack="end"
xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
title="Netscape Trust Partners"
onload="populatePartnersList; prunePartnersList();">
<script type="application/x-javascript">
<![CDATA[
function prunePartnersList() {
var partnersList = window.arguments[0];
for (var i = 0; i < partnersList.length; i++)
{
dump ("Displaying trust partner of " + partnersList[i] + "\n");
var partnerid = partnersList[i].replace(/[\W\.\,]/g, "").toLowerCase();
dump ("ID is going to be " + partnerid + "\n");
document.getElementById(partnerid + '-listitem').removeAttribute('hidden');
}
}
function populatePartnersList() {
var profileDir = Components.classes["@mozilla.org/file/directory_service;1"].
getService(Components.interfaces.nsIProperties).
get("XCurProcD", Components.interfaces.nsIFile);
profileDir.append("defaults");
profileDir.append("sitecontrols");
profileDir.append("providers.txt");
/*
var ios = Components.classes["@mozilla.org/network/io-service;1"]
.getService(Components.interfaces.nsIIOService);
var fileURI = ios.newFileURI(profileDir);
*/
var fis = Components.classes["@mozilla.org/network/file-input-stream;1"]
.createInstance(Components.interfaces.nsIFileInputStream);
fis.init(profileDir, this.PR_RDONLY, 0, 0);
fis.QueryInterface(Components.interfaces.nsILineInputStream);
// read lines into array
var line = {}, lines = [], hasmore;
do {
hasmore = fis.readLine(line);
lines.push(line.value);
} while(hasmore);
fis.close();
for (var i = 0; i < lines.length; i++)
{
var partner = lines[i].split("|");
dump ("Trying to add " + partner[1] + " to the list.\n" );
var newitem = document.getElementById('partnerList').appendItem(partner[1]);
newitem.id = partner[1].replace(/[\W\.\,]/g, "").toLowerCase() + "-listitem";
}
}
]]>
</script>
<vbox flex="1">
<hbox align="start" valign="top">
<label value="This site has been verified/flagged by the following partners:"/>
</hbox>
<listbox id="partnerList">
<listitem id="aolvault-listitem" label="AOL Vault" hidden="true"/>
<listitem id="truste-listitem" label="TRUSTe" hidden="true"/>
<listitem id="antispygroup-listitem" label="AntiSpy Group" hidden="true"/>
<listitem id="blackboxsecurity-listitem" label="Black Box Security" hidden="true"/>
<listitem id="securemeinc-listitem" label="SecureMe, Inc." hidden="true"/>
</listbox>
</vbox>
</dialog>