home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
PC World 2005 December
/
PCWorld_2005-12_cd.bin
/
komunikace
/
netscape
/
nsb-install-8-0.exe
/
chrome
/
browser.jar
/
content
/
browser
/
aboutDialog.js
< prev
next >
Wrap
Text File
|
2005-09-26
|
2KB
|
52 lines
function init(aEvent)
{
if (aEvent.target != document)
return;
// MERC (DP): use the date build as the build number
var regex = /^.*Gecko\//;
var match = navigator.userAgent.replace(regex, "$'");
var buildNumber = "Build number: " + match.substring(0, 8);
var userAgentField = document.getElementById("userAgent");
userAgentField.value = navigator.userAgent + '\n' + buildNumber;
var button = document.documentElement.getButton("extra2");
button.setAttribute("label", document.documentElement.getAttribute("creditslabel"));
gSelectedPage = 0;
button.addEventListener("command", switchPage, false);
document.documentElement.getButton("accept").focus();
}
function uninit(aEvent)
{
if (aEvent.target != document)
return;
var iframe = document.getElementById("creditsIframe");
iframe.setAttribute("src", "");
}
function switchPage(aEvent)
{
var button = aEvent.target;
if (button.localName != "button")
return;
var iframe = document.getElementById("creditsIframe");
if (gSelectedPage == 0) {
iframe.setAttribute("src", "chrome://browser/content/credits.xhtml");
button.setAttribute("label", document.documentElement.getAttribute("aboutlabel"));
gSelectedPage = 1;
}
else {
iframe.setAttribute("src", "");
button.setAttribute("label", document.documentElement.getAttribute("creditslabel"));
gSelectedPage = 0;
}
var modes = document.getElementById("modes");
modes.setAttribute("selectedIndex", gSelectedPage);
}