This commit is contained in:
hyatt%netscape.com 2002-10-08 23:04:11 +00:00
Родитель 9d19ef9ce4
Коммит 4a623caa5d
3 изменённых файлов: 57 добавлений и 1 удалений

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

@ -20,3 +20,41 @@
David Hyatt (hyatt@apple.com)
*/
var gSiteBox;
var gUnblockButton;
var gPageReport;
function onLoad()
{
gSiteBox = document.getElementById("siteBox");
gUnblockButton = document.getElementById("unblockButton");
gPageReport = opener.gBrowser.pageReport;
buildSiteBox();
}
function buildSiteBox()
{
for (var i = 0; i < gPageReport.length; i++) {
var found = false;
for (var j = 0; j < gSiteBox.childNodes.length; j++) {
if (gSiteBox.childNodes[i].label == gPageReport[i]) {
found = true;
break;
}
}
if (found) continue;
var listitem = document.createElementNS("http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul",
"listitem");
listitem.setAttribute("label", gPageReport[i]);
gSiteBox.appendChild(listitem);
}
}
function siteSelected()
{
gUnblockButton.disabled = (gSiteBox.selectedItems.length == 0);
}

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

@ -38,10 +38,22 @@
title="&caption.label;"
onload="onLoad()"
style="width: 40em;"
buttons="accept"
persist="screenX screenY"
screenX="24" screenY="24">
<script type="application/x-javascript" src="chrome://browser/content/pageReport.js"/>
<vbox>
<description>
&intro.label;
</description>
<listbox style="height:10em" id="siteBox" onselect="siteSelected();" flex="1"/>
<separator class="thin"/>
<hbox>
<button label="&unblock.label;" id="unblockButton" disabled="true"/>
<spacer flex="1"/>
<button dlgtype="accept" label="&done.label;" default="true" oncommand="window.close();"/>
</hbox>
</vbox>
</dialog>

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

@ -1 +1,7 @@
<!ENTITY caption.label "Blocked Resource Report">
<!ENTITY intro.label "The following sites were prevented from displaying
unrequested pop-up windows:">
<!ENTITY done.label "Done">
<!ENTITY unblock.label "Unblock Site">