Bug 277097 Tidy up cookie js/xul/pref code (Removing js/xul from extensions/cookie) - history for pref-cookies.xul/dtd and pref-images.xul/dtd can be got from the attic (see bug for details) - file removal part

p=me r=dwitte/benjamin sr=darin


git-svn-id: svn://10.0.0.236/trunk@170526 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
bugzilla%arlen.demon.co.uk
2005-03-10 18:59:11 +00:00
parent 0a4e7a7d24
commit 1dfbb047dc
37 changed files with 0 additions and 3395 deletions

View File

@@ -1,20 +0,0 @@
<!ENTITY props.box.label "About this cookie">
<!ENTITY props.name.label "Name:">
<!ENTITY props.value.label "Content:">
<!ENTITY props.domain.label "Host:">
<!ENTITY props.path.label "Path:">
<!ENTITY props.secure.label "Send For:">
<!ENTITY props.expires.label "Expires:">
<!ENTITY props.policy.label "Policy:">
<!ENTITY button.allow.label "Allow">
<!ENTITY button.allow.accesskey "A">
<!ENTITY button.session.label "Allow for Session">
<!ENTITY button.session.accesskey "S">
<!ENTITY button.deny.label "Deny">
<!ENTITY button.deny.accesskey "D">
<!ENTITY dialog.title "Confirm setting cookie">
<!ENTITY dialog.remember.label "Use my choice for all cookies from this site">
<!ENTITY dialog.remember.accesskey "U">

View File

@@ -1,17 +0,0 @@
hostColon=Host:
domainColon=Domain:
forSecureOnly=Encrypted connections only
forAnyConnection=Any type of connection
atEndOfSession=at end of session
showDetails=Show Details
hideDetails=Hide Details
detailsAccessKey=T
permissionToSetACookie = The site %S wants to set a cookie.
permissionToSetSecondCookie = The site %S wants to set a second cookie.
# LOCALIZATION NOTE (PermissionToSetAnotherCookie): First %S: sitename, second %S: number of cookies already present for that site
permissionToSetAnotherCookie = The site %S wants to set another cookie.\nYou already have %S cookies from this site.
permissionToModifyCookie = The site %S wants to modify an existing cookie.
permissionToAcceptImage = The site %S wants to load an image.
rememberThisDecision = Remember this decision

View File

@@ -1,26 +0,0 @@
<?xml version="1.0"?>
#filter substitution
<RDF:RDF xmlns:RDF="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:chrome="http://www.mozilla.org/rdf/chrome#">
<!-- list all the packages being supplied by this jar -->
<RDF:Seq about="urn:mozilla:locale:root">
<RDF:li resource="urn:mozilla:locale:@AB_CD@"/>
</RDF:Seq>
<!-- locale information -->
<RDF:Description about="urn:mozilla:locale:@AB_CD@">
<chrome:packages>
<RDF:Seq about="urn:mozilla:locale:@AB_CD@:packages">
<RDF:li resource="urn:mozilla:locale:@AB_CD@:cookie"/>
</RDF:Seq>
</chrome:packages>
</RDF:Description>
<!-- Version Information. State that we work only with major version of this
package. -->
<RDF:Description about="urn:mozilla:locale:@AB_CD@:cookie"
chrome:localeVersion="@MOZILLA_LOCALE_VERSION@"/>
</RDF:RDF>

View File

@@ -1,36 +0,0 @@
comm.jar:
* content/cookie/contents.rdf (resources/content/contents.rdf)
content/cookie/cookieTasksOverlay.xul (resources/content/cookieTasksOverlay.xul)
content/cookie/cookieNavigatorOverlay.xul (resources/content/cookieNavigatorOverlay.xul)
content/cookie/cookieContextOverlay.xul (resources/content/cookieContextOverlay.xul)
content/cookie/cookiePrefsOverlay.xul (resources/content/cookiePrefsOverlay.xul)
content/cookie/pref-cookies.xul (resources/content/pref-cookies.xul)
content/cookie/pref-images.xul (resources/content/pref-images.xul)
content/cookie/pref-popups.xul (resources/content/pref-popups.xul)
content/cookie/cookieOverlay.js (resources/content/cookieOverlay.js)
content/cookie/p3p.xul (resources/content/p3p.xul)
content/cookie/p3pDialog.xul (resources/content/p3pDialog.xul)
content/cookie/cookieAcceptDialog.xul (resources/content/cookieAcceptDialog.xul)
content/cookie/cookieAcceptDialog.js (resources/content/cookieAcceptDialog.js)
modern.jar:
skin/modern/communicator/cookie/taskbar-cookie.gif (resources/skin/modern/taskbar-cookie.gif)
skin/modern/communicator/cookie/status-cookie.gif (resources/skin/modern/status-cookie.gif)
classic.jar:
skin/classic/communicator/cookie/taskbar-cookie.gif (resources/skin/classic/taskbar-cookie.gif)
skin/classic/communicator/cookie/status-cookie.gif (resources/skin/classic/status-cookie.gif)
en-US.jar:
* locale/en-US/cookie/contents.rdf (resources/locale/en-US/contents.rdf)
locale/en-US/cookie/cookieTasksOverlay.dtd (resources/locale/en-US/cookieTasksOverlay.dtd)
locale/en-US/cookie/cookieNavigatorOverlay.dtd (resources/locale/en-US/cookieNavigatorOverlay.dtd)
locale/en-US/cookie/cookieContextOverlay.dtd (resources/locale/en-US/cookieContextOverlay.dtd)
locale/en-US/cookie/cookiePrefsOverlay.dtd (resources/locale/en-US/cookiePrefsOverlay.dtd)
locale/en-US/cookie/pref-cookies.dtd (resources/locale/en-US/pref-cookies.dtd)
locale/en-US/cookie/pref-images.dtd (resources/locale/en-US/pref-images.dtd)
locale/en-US/cookie/pref-popups.dtd (resources/locale/en-US/pref-popups.dtd)
locale/en-US/cookie/p3p.dtd (resources/locale/en-US/p3p.dtd)
locale/en-US/cookie/cookie.properties (resources/locale/en-US/cookie.properties)
locale/en-US/cookie/cookieAcceptDialog.properties (resources/locale/en-US/cookieAcceptDialog.properties)
locale/en-US/cookie/cookieAcceptDialog.dtd (resources/locale/en-US/cookieAcceptDialog.dtd)

View File

@@ -1,43 +0,0 @@
<?xml version="1.0"?>
<RDF:RDF xmlns:RDF="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:chrome="http://www.mozilla.org/rdf/chrome#">
<!-- list all the packages being supplied by this jar -->
<RDF:Seq about="urn:mozilla:package:root">
<RDF:li resource="urn:mozilla:package:cookie"/>
</RDF:Seq>
<!-- package information -->
<RDF:Description about="urn:mozilla:package:cookie"
chrome:displayName="Cookie Manager"
chrome:author="mozilla.org"
chrome:name="cookie"
#expand chrome:localeVersion="__MOZILLA_LOCALE_VERSION__">
</RDF:Description>
<!-- overlay information -->
<RDF:Seq about="urn:mozilla:overlays">
<RDF:li resource="chrome://communicator/content/contentAreaContextOverlay.xul"/>
<RDF:li resource="chrome://communicator/content/pref/preftree.xul"/>
<RDF:li resource="chrome://navigator/content/navigatorOverlay.xul"/>
<RDF:li resource="chrome://messenger/content/mailWindowOverlay.xul"/>
</RDF:Seq>
<RDF:Seq about="chrome://communicator/content/contentAreaContextOverlay.xul">
<RDF:li>chrome://cookie/content/cookieContextOverlay.xul</RDF:li>
</RDF:Seq>
<RDF:Seq about="chrome://communicator/content/pref/preftree.xul">
<RDF:li>chrome://cookie/content/cookiePrefsOverlay.xul</RDF:li>
</RDF:Seq>
<RDF:Seq about="chrome://navigator/content/navigatorOverlay.xul">
<RDF:li>chrome://cookie/content/cookieNavigatorOverlay.xul</RDF:li>
<RDF:li>chrome://cookie/content/cookieTasksOverlay.xul</RDF:li>
</RDF:Seq>
<RDF:Seq about="chrome://messenger/content/mailWindowOverlay.xul">
<RDF:li>chrome://cookie/content/cookieContextOverlay.xul</RDF:li>
</RDF:Seq>
</RDF:RDF>

View File

@@ -1,218 +0,0 @@
/* ***** BEGIN LICENSE BLOCK *****
* Version: MPL 1.1/GPL 2.0/LGPL 2.1
*
* The contents of this file are subject to the Mozilla Public License Version
* 1.1 (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
* http://www.mozilla.org/MPL/
*
* Software distributed under the License is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
* for the specific language governing rights and limitations under the
* License.
*
* The Original Code is cookie manager code.
*
* The Initial Developer of the Original Code is
* Michiel van Leeuwen.
* Portions created by the Initial Developer are Copyright (C) 2002
* the Initial Developer. All Rights Reserved.
*
* Contributor(s):
*
* Alternatively, the contents of this file may be used under the terms of
* either the GNU General Public License Version 2 or later (the "GPL"), or
* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
* in which case the provisions of the GPL or the LGPL are applicable instead
* of those above. If you wish to allow use of your version of this file only
* under the terms of either the GPL or the LGPL, and not to allow others to
* use your version of this file under the terms of the MPL, indicate your
* decision by deleting the provisions above and replace them with the notice
* and other provisions required by the GPL or the LGPL. If you do not delete
* the provisions above, a recipient may use your version of this file under
* the terms of any one of the MPL, the GPL or the LGPL.
*
* ***** END LICENSE BLOCK ***** */
const nsICookieAcceptDialog = Components.interfaces.nsICookieAcceptDialog;
const nsIDialogParamBlock = Components.interfaces.nsIDialogParamBlock;
const nsICookie = Components.interfaces.nsICookie;
const nsICookiePromptService = Components.interfaces.nsICookiePromptService;
var params;
var cookieBundle;
var gDateService = null;
var showDetails = "";
var hideDetails = "";
var detailsAccessKey = "";
function onload()
{
doSetOKCancel(cookieAcceptNormal, cookieDeny, cookieAcceptSession);
var dialog = document.documentElement;
document.getElementById("Button2").collapsed = false;
document.getElementById("ok").label = dialog.getAttribute("acceptLabel");
document.getElementById("ok").accessKey = dialog.getAttribute("acceptKey");
document.getElementById("Button2").label = dialog.getAttribute("extra1Label");
document.getElementById("Button2").accessKey = dialog.getAttribute("extra1Key");
document.getElementById("cancel").label = dialog.getAttribute("cancelLabel");
document.getElementById("cancel").accessKey = dialog.getAttribute("cancelKey");
if (!gDateService) {
const nsScriptableDateFormat_CONTRACTID = "@mozilla.org/intl/scriptabledateformat;1";
const nsIScriptableDateFormat = Components.interfaces.nsIScriptableDateFormat;
gDateService = Components.classes[nsScriptableDateFormat_CONTRACTID]
.getService(nsIScriptableDateFormat);
}
cookieBundle = document.getElementById("cookieBundle");
//cache strings
if (!showDetails) {
showDetails = cookieBundle.getString('showDetails');
}
if (!hideDetails) {
hideDetails = cookieBundle.getString('hideDetails');
}
detailsAccessKey = cookieBundle.getString('detailsAccessKey');
if (document.getElementById('infobox').hidden) {
document.getElementById('disclosureButton').setAttribute("label",showDetails);
} else {
document.getElementById('disclosureButton').setAttribute("label",hideDetails);
}
document.getElementById('disclosureButton').setAttribute("accesskey",detailsAccessKey);
if ("arguments" in window && window.arguments.length >= 1 && window.arguments[0]) {
try {
params = window.arguments[0].QueryInterface(nsIDialogParamBlock);
var objects = params.objects;
var cookie = params.objects.queryElementAt(0,nsICookie);
var cookiesFromHost = params.GetInt(nsICookieAcceptDialog.COOKIESFROMHOST);
var messageFormat;
if (params.GetInt(nsICookieAcceptDialog.CHANGINGCOOKIE))
messageFormat = 'permissionToModifyCookie';
else if (cookiesFromHost > 1)
messageFormat = 'permissionToSetAnotherCookie';
else if (cookiesFromHost == 1)
messageFormat = 'permissionToSetSecondCookie';
else
messageFormat = 'permissionToSetACookie';
var hostname = params.GetString(nsICookieAcceptDialog.HOSTNAME);
var messageText;
if (cookie)
messageText = cookieBundle.getFormattedString(messageFormat,[hostname, cookiesFromHost]);
else
// No cookies means something went wrong. Bring up the dialog anyway
// to not make the mess worse.
messageText = cookieBundle.getFormattedString(messageFormat,["",cookiesFromHost]);
var messageParent = document.getElementById("dialogtextbox");
var messageParagraphs = messageText.split("\n");
// use value for the header, so it doesn't wrap.
var headerNode = document.getElementById("dialog-header");
headerNode.setAttribute("value",messageParagraphs[0]);
// use childnodes here, the text can wrap
for (var i = 1; i < messageParagraphs.length; i++) {
var descriptionNode = document.createElement("description");
text = document.createTextNode(messageParagraphs[i]);
descriptionNode.appendChild(text);
messageParent.appendChild(descriptionNode);
}
if (cookie) {
document.getElementById('ifl_name').setAttribute("value",cookie.name);
document.getElementById('ifl_value').setAttribute("value",cookie.value);
document.getElementById('ifl_host').setAttribute("value",cookie.host);
document.getElementById('ifl_path').setAttribute("value",cookie.path);
document.getElementById('ifl_isSecure').setAttribute("value",
cookie.isSecure ?
cookieBundle.getString("forSecureOnly") : cookieBundle.getString("forAnyConnection")
);
document.getElementById('ifl_expires').setAttribute("value",GetExpiresString(cookie.expires));
document.getElementById('ifl_isDomain').setAttribute("value",
cookie.isDomain ?
cookieBundle.getString("domainColon") : cookieBundle.getString("hostColon")
);
}
// set default result to not accept the cookie
params.SetInt(nsICookieAcceptDialog.ACCEPT_COOKIE, 0);
// and to not persist
params.SetInt(nsICookieAcceptDialog.REMEMBER_DECISION, 0);
} catch (e) {
}
}
}
function showhideinfo()
{
var infobox=document.getElementById('infobox');
if (infobox.hidden) {
infobox.setAttribute("hidden","false");
document.getElementById('disclosureButton').setAttribute("label",hideDetails);
} else {
infobox.setAttribute("hidden","true");
document.getElementById('disclosureButton').setAttribute("label",showDetails);
}
sizeToContent();
}
function cookieAcceptNormal()
{
// accept the cookie normally
params.SetInt(nsICookieAcceptDialog.ACCEPT_COOKIE, nsICookiePromptService.ACCEPT_COOKIE);
// And remember that when needed
params.SetInt(nsICookieAcceptDialog.REMEMBER_DECISION, document.getElementById('persistDomainAcceptance').checked);
window.close();
}
function cookieAcceptSession()
{
// accept for the session only
params.SetInt(nsICookieAcceptDialog.ACCEPT_COOKIE, nsICookiePromptService.ACCEPT_SESSION_COOKIE);
// And remember that when needed
params.SetInt(nsICookieAcceptDialog.REMEMBER_DECISION, document.getElementById('persistDomainAcceptance').checked);
window.close();
}
function cookieDeny()
{
// say that the cookie was rejected
params.SetInt(nsICookieAcceptDialog.ACCEPT_COOKIE, nsICookiePromptService.DENY_COOKIE);
// And remember that when needed
params.SetInt(nsICookieAcceptDialog.REMEMBER_DECISION, document.getElementById('persistDomainAcceptance').checked);
window.close();
}
function GetExpiresString(secondsUntilExpires) {
if (secondsUntilExpires) {
var date = new Date(1000*secondsUntilExpires);
// if a server manages to set a really long-lived cookie, the dateservice
// can't cope with it properly, so we'll just return a blank string
// see bug 238045 for details
var expiry = "";
try {
expiry = gDateService.FormatDateTime("", gDateService.dateFormatLong,
gDateService.timeFormatSeconds,
date.getFullYear(), date.getMonth()+1,
date.getDate(), date.getHours(),
date.getMinutes(), date.getSeconds());
} catch(ex) {
// do nothing
}
return expiry;
}
return cookieBundle.getString("atEndOfSession");
}

View File

@@ -1,156 +0,0 @@
<?xml version="1.0"?>
<!-- ***** BEGIN LICENSE BLOCK *****
- Version: MPL 1.1/GPL 2.0/LGPL 2.1
-
- The contents of this file are subject to the Mozilla Public License Version
- 1.1 (the "License"); you may not use this file except in compliance with
- the License. You may obtain a copy of the License at
- http://www.mozilla.org/MPL/
-
- Software distributed under the License is distributed on an "AS IS" basis,
- WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- for the specific language governing rights and limitations under the
- License.
-
- The Original Code is cookie manager code.
-
- The Initial Developer of the Original Code is
- Michiel van Leeuwen.
- Portions created by the Initial Developer are Copyright (C) 2002
- the Initial Developer. All Rights Reserved.
-
- Contributor(s):
-
- Alternatively, the contents of this file may be used under the terms of
- either the GNU General Public License Version 2 or later (the "GPL"), or
- the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- in which case the provisions of the GPL or the LGPL are applicable instead
- of those above. If you wish to allow use of your version of this file only
- under the terms of either the GPL or the LGPL, and not to allow others to
- use your version of this file under the terms of the MPL, indicate your
- decision by deleting the provisions above and replace them with the notice
- and other provisions required by the LGPL or the GPL. If you do not delete
- the provisions above, a recipient may use your version of this file under
- the terms of any one of the MPL, the GPL or the LGPL.
-
- ***** END LICENSE BLOCK ***** -->
<?xml-stylesheet href="chrome://global/skin/" type="text/css"?>
<!DOCTYPE dialog SYSTEM "chrome://cookie/locale/cookieAcceptDialog.dtd">
<!-- use a overlay te be able to put the accept/deny buttons not on the bottom -->
<?xul-overlay href="chrome://global/content/dialogOverlay.xul"?>
<!-- use buttons="disclosure" to hide ok/cancel buttons. Those are added manually later -->
<dialog id="cookieAcceptDialog"
acceptLabel="&button.allow.label;"
acceptKey="&button.allow.accesskey;"
extra1Label="&button.session.label;"
extra1Key="&button.session.accesskey;"
cancelLabel="&button.deny.label;"
cancelKey="&button.deny.accesskey;"
onload="onload();"
ondialogaccept="return doOKButton();"
title="&dialog.title;"
buttons="disclosure"
xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
<script src="cookieAcceptDialog.js" type="application/x-javascript"/>
<stringbundle id="cookieBundle"
src="chrome://cookie/locale/cookieAcceptDialog.properties"/>
<vbox>
<hbox>
<hbox align="start">
<image id="infoicon" class="spaced alert-icon"/>
</hbox>
<vbox flex="1">
<!-- text -->
<vbox id="dialogtextbox">
<description id="dialog-header" class="header"/>
</vbox>
<hbox id="checkboxContainer">
<checkbox id="persistDomainAcceptance"
label="&dialog.remember.label;"
accesskey="&dialog.remember.accesskey;"
persist="checked"/>
</hbox>
</vbox>
</hbox>
<hbox>
<button id="disclosureButton" dlgtype="disclosure" class="exit-dialog"
oncommand="showhideinfo();"/>
<spacer flex="1"/>
<hbox id="okCancelButtonsRight"/>
</hbox>
<vbox id="infobox" hidden="true" persist="hidden">
<separator class="groove"/>
<grid flex="1">
<columns>
<column/>
<column flex="1"/>
</columns>
<rows>
<row align="center">
<hbox align="center" pack="end">
<label value="&props.name.label;"/>
</hbox>
<textbox id="ifl_name" readonly="true" class="plain"/>
</row>
<row align="center">
<hbox align="center" pack="end">
<label value="&props.value.label;"/>
</hbox>
<textbox id="ifl_value" readonly="true" class="plain"/>
</row>
<row align="center">
<hbox align="center" pack="end">
<label id="ifl_isDomain" value="&props.domain.label;"/>
</hbox>
<textbox id="ifl_host" readonly="true" class="plain"/>
</row>
<row align="center">
<hbox align="center" pack="end">
<label value="&props.path.label;"/>
</hbox>
<textbox id="ifl_path" readonly="true" class="plain"/>
</row>
<row align="center">
<hbox align="center" pack="end">
<label value="&props.secure.label;"/>
</hbox>
<textbox id="ifl_isSecure" readonly="true" class="plain"/>
</row>
<row align="center">
<hbox align="center" pack="end">
<label value="&props.expires.label;"/>
</hbox>
<textbox id="ifl_expires" readonly="true" class="plain"/>
</row>
<row align="center" id="policyField" hidden="true">
<hbox align="center" pack="end">
<label value="&props.policy.label;"/>
</hbox>
<textbox id="ifl_policy" readonly="true" class="plain"/>
</row>
</rows>
</grid>
</vbox>
</vbox>
</dialog>

View File

@@ -1,160 +0,0 @@
<?xml version="1.0"?>
<!-- ***** BEGIN LICENSE BLOCK *****
Version: MPL 1.1/GPL 2.0/LGPL 2.1
The contents of this file are subject to the Mozilla Public License Version
1.1 (the "License"); you may not use this file except in compliance with
the License. You may obtain a copy of the License at
http://www.mozilla.org/MPL/
Software distributed under the License is distributed on an "AS IS" basis,
WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
for the specific language governing rights and limitations under the
License.
The Original Code is Mozilla Communicator client code, released
March 31, 1998.
The Initial Developer of the Original Code is
Netscape Communications Corporation.
Portions created by the Initial Developer are Copyright (C) 1998-1999
the Initial Developer. All Rights Reserved.
Contributor(s):
Alternatively, the contents of this file may be used under the terms of
either the GNU General Public License Version 2 or later (the "GPL"), or
the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
in which case the provisions of the GPL or the LGPL are applicable instead
of those above. If you wish to allow use of your version of this file only
under the terms of either the GPL or the LGPL, and not to allow others to
use your version of this file under the terms of the MPL, indicate your
decision by deleting the provisions above and replace them with the notice
and other provisions required by the GPL or the LGPL. If you do not delete
the provisions above, a recipient may use your version of this file under
the terms of any one of the MPL, the GPL or the LGPL.
***** END LICENSE BLOCK ***** -->
<!DOCTYPE overlay SYSTEM "chrome://cookie/locale/cookieContextOverlay.dtd">
<overlay id="cookieContextOverlay"
xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
<script type="application/x-javascript" src="chrome://cookie/content/cookieOverlay.js"/>
<script type="application/x-javascript">
<![CDATA[
// Code from nsContextMenu.js. Note that we extend the prototype here, rather
// than making these methods on a new object, as some methods require access
// to data maintained by nsContextMenu.
var cookieContextMenu = {
// Determine if "Block Image" is to appear in the menu.
// Return true if image is not already blocked.
isBlockingImages : function () {
/* determine if image is already being blocked */
const nsIPermissionManager = Components.interfaces.nsIPermissionManager;
var permissionmanager =
Components.classes["@mozilla.org/permissionmanager;1"]
.getService(Components.interfaces.nsIPermissionManager);
if(!permissionmanager) {
return true;
}
var ioService = Components.classes["@mozilla.org/network/io-service;1"]
.getService(Components.interfaces.nsIIOService);
var uri = ioService.newURI(gContextMenu.imageURL, null, null);
return permissionmanager.testPermission(uri, "image") != nsIPermissionManager.DENY_ACTION;
},
// Block image from loading in the future.
blockImage : function () {
const nsIPermissionManager = Components.interfaces.nsIPermissionManager;
var permissionmanager =
Components.classes["@mozilla.org/permissionmanager;1"]
.getService(Components.interfaces.nsIPermissionManager);
if (!permissionmanager) {
return;
}
var ioService = Components.classes["@mozilla.org/network/io-service;1"]
.getService(Components.interfaces.nsIIOService);
uri = ioService.newURI(gContextMenu.imageURL, null, null);
permissionmanager.add(uri, "image", nsIPermissionManager.DENY_ACTION);
},
// Unblock image from loading in the future.
unblockImage : function () {
const nsIPermissionManager = Components.interfaces.nsIPermissionManager;
var permissionmanager =
Components.classes["@mozilla.org/permissionmanager;1"]
.getService().QueryInterface(Components.interfaces.nsIPermissionManager);
if (!permissionmanager) {
return;
}
var ioService = Components.classes["@mozilla.org/network/io-service;1"]
.getService(Components.interfaces.nsIIOService);
uri = ioService.newURI(gContextMenu.imageURL, null, null);
permissionmanager.remove(uri.host, "image");
},
initImageBlocking : function () {
try {
// Block image depends on whether an image was clicked on
gContextMenu.showItem
("context-blockimage",
gContextMenu.onImage && cookieContextMenu.isBlockingImages());
gContextMenu.showItem
("context-unblockimage",
gContextMenu.onImage && !cookieContextMenu.isBlockingImages());
} catch (e) {}
},
addContextMenuItemListeners : function (aEvent) {
var contextPopup = document.getElementById("contentAreaContextSet");
if (contextPopup)
contextPopup.addEventListener("popupshowing", cookieContextMenu.initImageBlocking, false);
var mailContextPopup = document.getElementById("messagePaneContext");
if (mailContextPopup)
mailContextPopup.addEventListener("popupshowing", cookieContextMenu.initImageBlocking, false);
}
}
window.addEventListener("load", cookieContextMenu.addContextMenuItemListeners, false);
]]>
</script>
<!-- context menu -->
<popup id="contentAreaContextMenu">
<menuitem id="context-blockimage"
label="&blockImageCmd.label;"
accesskey=""
oncommand="cookieContextMenu.blockImage();"
insertafter="context-viewimage"/>
<menuitem id="context-unblockimage"
label="&unblockImageCmd.label;"
accesskey=""
oncommand="cookieContextMenu.unblockImage();"
insertafter="context-viewimage"/>
</popup>
<!-- Mail Message Pane context menu -->
<popup id="messagePaneContext">
<menuitem id="context-blockimage"
label="&blockImageCmd.label;"
accesskey=""
oncommand="cookieContextMenu.blockImage();"
insertafter="context-viewimage"/>
<menuitem id="context-unblockimage"
label="&unblockImageCmd.label;"
accesskey=""
oncommand="cookieContextMenu.unblockImage();"
insertafter="context-viewimage"/>
</popup>
</overlay>

View File

@@ -1,286 +0,0 @@
<?xml version="1.0"?>
<!-- ***** BEGIN LICENSE BLOCK *****
Version: MPL 1.1/GPL 2.0/LGPL 2.1
The contents of this file are subject to the Mozilla Public License Version
1.1 (the "License"); you may not use this file except in compliance with
the License. You may obtain a copy of the License at
http://www.mozilla.org/MPL/
Software distributed under the License is distributed on an "AS IS" basis,
WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
for the specific language governing rights and limitations under the
License.
The Original Code is Mozilla Communicator client code, released
March 31, 1998.
The Initial Developer of the Original Code is
Netscape Communications Corporation.
Portions created by the Initial Developer are Copyright (C) 1998-1999
the Initial Developer. All Rights Reserved.
Contributor(s):
Alternatively, the contents of this file may be used under the terms of
either the GNU General Public License Version 2 or later (the "GPL"), or
the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
in which case the provisions of the GPL or the LGPL are applicable instead
of those above. If you wish to allow use of your version of this file only
under the terms of either the GPL or the LGPL, and not to allow others to
use your version of this file under the terms of the MPL, indicate your
decision by deleting the provisions above and replace them with the notice
and other provisions required by the GPL or the LGPL. If you do not delete
the provisions above, a recipient may use your version of this file under
the terms of any one of the MPL, the GPL or the LGPL.
***** END LICENSE BLOCK ***** -->
<!DOCTYPE overlay SYSTEM "chrome://cookie/locale/cookieNavigatorOverlay.dtd">
<overlay id="cookieNavigatorOverlay"
xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
<script type="application/x-javascript" src="chrome://cookie/content/cookieOverlay.js"/>
<script type="application/x-javascript">
<![CDATA[
/******* THE FOLLOWING IS FOR THE TASKMENU OVERLAY *******/
// both are necessary. popupmanager is just a special case
// of permissionmanager but does extra work on add/remove
const nsIPermissionManager = Components.interfaces.nsIPermissionManager;
const nsICookiePermission = Components.interfaces.nsICookiePermission;
var permissionmanager;
var popupmanager;
// determine which items we need to hide or disable from the task menu
function CheckForVisibility()
{
// obtain access to permissionmanager and popupmanager
// (popup manager is a wrapper around permission that does extra work)
permissionmanager =
Components.classes["@mozilla.org/permissionmanager;1"]
.getService(Components.interfaces.nsIPermissionManager);
popupmanager =
Components.classes["@mozilla.org/PopupWindowManager;1"]
.getService(Components.interfaces.nsIPopupWindowManager);
if (!("content" in window) || !window.content) {
// this occurs if doing tasks->privacy->cookie->block from java console
return;
}
// determine current state (blocked or unblocked) and hide appropriate menu item
var uri = getBrowser().currentURI;
setRadioButton("UseCookiesDefault", uri, nsIPermissionManager.UNKNOWN_ACTION, "cookie");
setRadioButton("AllowCookies", uri, nsIPermissionManager.ALLOW_ACTION, "cookie");
setRadioButton("AllowSessionCookies", uri, nsICookiePermission.ACCESS_SESSION, "cookie");
setRadioButton("BlockCookies", uri, nsIPermissionManager.DENY_ACTION, "cookie");
setRadioButton("UseImagesDefault", uri, nsIPermissionManager.UNKNOWN_ACTION, "image");
setRadioButton("AllowImages", uri, nsIPermissionManager.ALLOW_ACTION, "image");
setRadioButton("BlockImages", uri, nsIPermissionManager.DENY_ACTION, "image");
SetPopupMenuEnabledState();
var pref;
pref = Components.classes['@mozilla.org/preferences-service;1'];
pref = pref.getService();
pref = pref.QueryInterface(Components.interfaces.nsIPrefBranch);
}
function SetPopupMenuEnabledState() {
var blocked = nsIPermissionManager.UNKNOWN_ACTION;
var policy = pref.getBoolPref("dom.disable_open_during_load");
blocked = permissionmanager.testPermission(getBrowser().currentURI, "popup");
document.getElementById("AboutPopups").hidden = policy;
document.getElementById("ManagePopups").hidden = !policy;
if (policy) {
enableElement("AllowPopups", blocked != nsIPermissionManager.ALLOW_ACTION);
return;
}
enableElement("AllowPopups", false);
}
function setRadioButton(elementID, uri, perm, type) {
var enable = (perm == permissionmanager.testPermission(uri, type));
document.getElementById(elementID).setAttribute("checked", enable);
}
function enableElement(elementID, enable) {
var element = document.getElementById(elementID);
if (enable)
element.removeAttribute("disabled");
else
element.setAttribute("disabled", "true");
}
// perform a Cookie or Image action
function CookieImageAction(action) {
if (!("content" in window) || !window.content) {
// this occurs if doing tasks->privacy->cookie->block from java console
return;
}
var element;
var uri = getBrowser().currentURI;
switch (action) {
case "cookieAllow":
if (permissionmanager.testPermission(uri, "cookie") == nsIPermissionManager.ALLOW_ACTION)
return;
permissionmanager.add(uri, "cookie", nsIPermissionManager.ALLOW_ACTION);
element = document.getElementById("AllowCookies");
break;
case "cookieSession":
if (permissionmanager.testPermission(uri, "cookie") == nsICookiePermission.ACCESS_SESSION)
return;
permissionmanager.add(uri, "cookie", nsICookiePermission.ACCESS_SESSION);
element = document.getElementById("AllowSessionCookies");
break;
case "cookieDefault":
if (permissionmanager.testPermission(uri, "cookie") == nsIPermissionManager.UNKNOWN_ACTION)
return;
permissionmanager.remove(uri.host, "cookie");
element = document.getElementById("UseCookiesDefault");
break;
case "cookieBlock":
if (permissionmanager.testPermission(uri, "cookie") == nsIPermissionManager.DENY_ACTION)
return;
permissionmanager.add(uri, "cookie", nsIPermissionManager.DENY_ACTION);
element = document.getElementById("BlockCookies");
break;
case "imageAllow":
if (permissionmanager.testPermission(uri, "image") == nsIPermissionManager.ALLOW_ACTION)
return;
permissionmanager.add(uri, "image", nsIPermissionManager.ALLOW_ACTION);
element = document.getElementById("AllowImages");
break;
case "imageDefault":
if (permissionmanager.testPermission(uri, "image") == nsIPermissionManager.UNKNOWN_ACTION)
return;
permissionmanager.remove(uri.host, "image");
element = document.getElementById("UseImagesDefault");
break;
case "imageBlock":
if (permissionmanager.testPermission(uri, "image") == nsIPermissionManager.DENY_ACTION)
return;
permissionmanager.add(uri, "image", nsIPermissionManager.DENY_ACTION);
element = document.getElementById("BlockImages");
break;
default:
return;
}
var promptService = Components.classes["@mozilla.org/embedcomp/prompt-service;1"]
.getService(Components.interfaces.nsIPromptService);
promptService.alert(window,element.getAttribute("title"), element.getAttribute("msg"));
}
function OpenAboutPopups() {
window.openDialog("chrome://communicator/content/aboutPopups.xul", "",
"chrome,centerscreen,dependent",
false);
}
function OpenManagePopups(host) {
window.openDialog("chrome://communicator/content/popupManager.xul", "",
"chrome,resizable=yes",
host);
}
]]>
</script>
<!-- tasksOverlay menu items -->
<menupopup id="taskPopup" onpopupshowing="CheckForVisibility()">
<menu insertbefore="navBeginGlobalItems"
label="&cookieCookieManager.label;"
accesskey="&cookieCookieManager.accesskey;">
<menupopup>
<menuitem id="BlockCookies" label="&cookieBlockCookiesCmd.label;"
accesskey="&cookieBlockCookiesCmd.accesskey;"
title="&cookieMessageTitle.label;"
msg="&cookieBlockCookiesMsg.label;"
type="radio" name="cookies"
oncommand="CookieImageAction('cookieBlock');"/>
<menuitem id="UseCookiesDefault" label="&cookieCookiesDefaultCmd.label;"
accesskey="&cookieCookiesDefaultCmd.accesskey;"
title="&cookieMessageTitle.label;"
msg="&cookieCookiesDefaultMsg.label;"
type="radio" name="cookies" checked="true"
oncommand="CookieImageAction('cookieDefault');"/>
<menuitem id="AllowSessionCookies" label="&cookieAllowSessionCookiesCmd.label;"
title="&cookieMessageTitle.label;"
accesskey="&cookieAllowSessionCookiesCmd.accesskey;"
msg="&cookieAllowSessionCookiesMsg.label;"
type="radio" name="cookies"
oncommand="CookieImageAction('cookieSession');"/>
<menuitem id="AllowCookies" label="&cookieAllowCookiesCmd.label;"
title="&cookieMessageTitle.label;"
accesskey="&cookieAllowCookiesCmd.accesskey;"
msg="&cookieAllowCookiesMsg.label;"
type="radio" name="cookies"
oncommand="CookieImageAction('cookieAllow');"/>
<menuseparator/>
<menuitem label="&cookieDisplayCookiesCmd.label;"
accesskey="&cookieDisplayCookiesCmd.accesskey;"
oncommand="viewCookies();"/>
</menupopup>
</menu>
<menu label="&cookieImageManager.label;"
accesskey="&cookieImageManager.accesskey;"
id="image"
insertbefore="navBeginGlobalItems">
<menupopup>
<menuitem id="BlockImages" label="&cookieBlockImagesCmd.label;"
accesskey="&cookieBlockImagesCmd.accesskey;"
title="&cookieImageMessageTitle.label;"
msg="&cookieBlockImagesMsg.label;"
type="radio" name="images"
oncommand="CookieImageAction('imageBlock');"/>
<menuitem id="UseImagesDefault" label="&cookieImagesDefaultCmd.label;"
accesskey="&cookieImagesDefaultCmd.accesskey;"
title="&cookieImageMessageTitle.label;"
msg="&cookieImagesDefaultMsg.label;"
type="radio" name="images"
oncommand="CookieImageAction('imageDefault');"/>
<menuitem id="AllowImages" label="&cookieAllowImagesCmd.label;"
accesskey="&cookieAllowImagesCmd.accesskey;"
title="&cookieImageMessageTitle.label;"
msg="&cookieAllowImagesMsg.label;"
type="radio" name="images"
oncommand="CookieImageAction('imageAllow');"/>
<menuseparator/>
<menuitem label="&cookieDisplayImagesCmd.label;"
accesskey="&cookieDisplayImagesCmd.accesskey;"
oncommand="viewImages();"/>
</menupopup>
</menu>
<menu label="&cookiePopupManager.label;"
accesskey="&cookiePopupManager.accesskey;"
id="popup"
insertbefore="navBeginGlobalItems"
oncommand="popupBlockerMenuCommand(event.target);"
onpopupshowing="return popupBlockerMenuShowing(event)" >
<menupopup>
<menuitem id="AllowPopups" label="&cookieAllowPopupsCmd.label;"
accesskey="&cookieAllowPopupsCmd.accesskey;"
oncommand="OpenManagePopups(getBrowser().currentURI.host);"/>
<menuitem id="AboutPopups" label="&cookieAboutPopupBlocking.label;"
accesskey="&cookieAboutPopupBlocking.accesskey;"
oncommand="OpenAboutPopups();"
hidden="true"/>
<menuitem id="ManagePopups" label="&cookieManagePopups.label;"
accesskey="&cookieManagePopups.accesskey;"
oncommand="OpenManagePopups('');"
hidden="true"/>
<menuseparator id="popupMenuSeparator" hidden="true"/>
<!-- Additional items are generated, see popupBlockerMenuShowing()
in navigator.js -->
</menupopup>
</menu>
</menupopup>
</overlay>

View File

@@ -1,71 +0,0 @@
/* -*- Mode: Java; tab-width: 4; c-basic-offset: 4; -*-
*
* ***** BEGIN LICENSE BLOCK *****
* Version: MPL 1.1/GPL 2.0/LGPL 2.1
*
* The contents of this file are subject to the Mozilla Public License Version
* 1.1 (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
* http://www.mozilla.org/MPL/
*
* Software distributed under the License is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
* for the specific language governing rights and limitations under the
* License.
*
* The Original Code is mozilla.org Code.
*
* The Initial Developer of the Original Code is
* Netscape Communications Corporation.
* Portions created by the Initial Developer are Copyright (C) 1998
* the Initial Developer. All Rights Reserved.
*
* Contributor(s):
* Neil Rashbrook <neil@parkwaycc.co.uk>
*
* Alternatively, the contents of this file may be used under the terms of
* either the GNU General Public License Version 2 or later (the "GPL"), or
* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
* in which case the provisions of the GPL or the LGPL are applicable instead
* of those above. If you wish to allow use of your version of this file only
* under the terms of either the GPL or the LGPL, and not to allow others to
* use your version of this file under the terms of the MPL, indicate your
* decision by deleting the provisions above and replace them with the notice
* and other provisions required by the GPL or the LGPL. If you do not delete
* the provisions above, a recipient may use your version of this file under
* the terms of any one of the MPL, the GPL or the LGPL.
*
* ***** END LICENSE BLOCK ***** */
function openCookieViewer(viewerType)
{
const wm = Components.classes["@mozilla.org/appshell/window-mediator;1"]
.getService(Components.interfaces.nsIWindowMediator);
var enumerator = wm.getEnumerator("mozilla:cookieviewer");
while (enumerator.hasMoreElements()) {
var viewer = enumerator.getNext();
if (viewer.arguments[0] == viewerType) {
viewer.focus();
return;
}
}
window.openDialog("chrome://communicator/content/wallet/CookieViewer.xul",
"_blank", "chrome,resizable", viewerType);
}
function viewImages() {
openCookieViewer("imageManager");
}
function viewCookies() {
openCookieViewer("cookieManager");
}
function viewCookiesFromIcon() {
openCookieViewer("cookieManagerFromIcon");
}
function viewP3P() {
window.openDialog
("chrome://cookie/content/p3p.xul","_blank","chrome,resizable=no");
}

View File

@@ -1,67 +0,0 @@
<?xml version="1.0"?>
<!-- ***** BEGIN LICENSE BLOCK *****
- Version: MPL 1.1/GPL 2.0/LGPL 2.1
-
- The contents of this file are subject to the Mozilla Public License Version
- 1.1 (the "License"); you may not use this file except in compliance with
- the License. You may obtain a copy of the License at
- http://www.mozilla.org/MPL/
-
- Software distributed under the License is distributed on an "AS IS" basis,
- WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- for the specific language governing rights and limitations under the
- License.
-
- The Original Code is Mozilla Communicator client code, released
- March 31, 1998.
-
- The Initial Developer of the Original Code is
- Netscape Communications Corporation.
- Portions created by the Initial Developer are Copyright (C) 1998-1999
- the Initial Developer. All Rights Reserved.
-
- Contributor(s):
-
- Alternatively, the contents of this file may be used under the terms of
- either the GNU General Public License Version 2 or later (the "GPL"), or
- the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- in which case the provisions of the GPL or the LGPL are applicable instead
- of those above. If you wish to allow use of your version of this file only
- under the terms of either the GPL or the LGPL, and not to allow others to
- use your version of this file under the terms of the MPL, indicate your
- decision by deleting the provisions above and replace them with the notice
- and other provisions required by the GPL or the LGPL. If you do not delete
- the provisions above, a recipient may use your version of this file under
- the terms of any one of the MPL, the GPL or the LGPL.
-
- ***** END LICENSE BLOCK ***** -->
<!DOCTYPE overlay SYSTEM "chrome://cookie/locale/cookiePrefsOverlay.dtd" >
<overlay id="cookiePrefsOverlay"
xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
<treechildren id="securityChildren">
<treeitem position="1">
<treerow>
<treecell url="chrome://cookie/content/pref-cookies.xul"
label="&cookies.label;"
id="cookiesCell"/>
</treerow>
</treeitem>
<treeitem position="2">
<treerow>
<treecell url="chrome://cookie/content/pref-images.xul"
label="&images.label;"/>
</treerow>
</treeitem>
<treeitem id="popupspref" position="3">
<treerow>
<treecell url="chrome://cookie/content/pref-popups.xul"
label="&popups.label;"/>
</treerow>
</treeitem>
</treechildren>
</overlay>

View File

@@ -1,135 +0,0 @@
<?xml version="1.0"?>
<!-- ***** BEGIN LICENSE BLOCK *****
Version: MPL 1.1/GPL 2.0/LGPL 2.1
The contents of this file are subject to the Mozilla Public License Version
1.1 (the "License"); you may not use this file except in compliance with
the License. You may obtain a copy of the License at
http://www.mozilla.org/MPL/
Software distributed under the License is distributed on an "AS IS" basis,
WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
for the specific language governing rights and limitations under the
License.
The Original Code is Mozilla Communicator client code, released
March 31, 1998.
The Initial Developer of the Original Code is
Netscape Communications Corporation.
Portions created by the Initial Developer are Copyright (C) 1998-1999
the Initial Developer. All Rights Reserved.
Contributor(s):
Alternatively, the contents of this file may be used under the terms of
either the GNU General Public License Version 2 or later (the "GPL"), or
the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
in which case the provisions of the GPL or the LGPL are applicable instead
of those above. If you wish to allow use of your version of this file only
under the terms of either the GPL or the LGPL, and not to allow others to
use your version of this file under the terms of the MPL, indicate your
decision by deleting the provisions above and replace them with the notice
and other provisions required by the GPL or the LGPL. If you do not delete
the provisions above, a recipient may use your version of this file under
the terms of any one of the MPL, the GPL or the LGPL.
***** END LICENSE BLOCK ***** -->
<!DOCTYPE overlay SYSTEM "chrome://cookie/locale/cookieTasksOverlay.dtd">
<overlay id="cookieTasksOverlay"
xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
<script type="application/x-javascript" src="chrome://cookie/content/cookieOverlay.js"/>
<script type="application/x-javascript">
<![CDATA[
/******* THE FOLLOWING IS FOR THE STATUSBAR OVERLAY *******/
var gButtonPressed;
var cookieIconObserver = {
observe: function(subject, topic, state) {
if (topic != "cookieIcon" || !document) {
return;
}
var cookieIcon = document.getElementById("privacy-button");
if (cookieIcon) {
if (state == "on") {
cookieIcon.removeAttribute("hidden");
} else if (state == "off") {
cookieIcon.setAttribute("hidden", "true");
}
}
}
}
function viewP3PDialog() {
var observerService = Components.classes["@mozilla.org/observer-service;1"].getService(Components.interfaces.nsIObserverService);
observerService.notifyObservers(null, "cookieIcon", "off");
window.openDialog
("chrome://cookie/content/p3pDialog.xul","_blank","modal=yes,chrome,resizable=no", this);
if (gButtonPressed == "cookie") {
viewCookiesFromIcon();
} else if (gButtonPressed == "p3p") {
viewP3P();
}
}
function CookieTasksOnLoad(event) {
addEventListener("unload", CookieTasksOnUnload, false);
// determine if p3p pref is set
var pref = Components.classes['@mozilla.org/preferences-service;1'].
getService(Components.interfaces.nsIPrefBranch);
if (pref.getIntPref("network.cookie.cookieBehavior") == 3) {
// make sure p3p dll exists, else we can't keep pref set
if (!("@mozilla.org/cookie-consent;1" in Components.classes)) {
pref.setIntPref("network.cookie.cookieBehavior", 0);
}
}
if ("@mozilla.org/cookie-consent;1" in Components.classes) {
// p3p dll exists so create an observer for changes in visibility of cookie icon
var observerService = Components.classes["@mozilla.org/observer-service;1"].getService(Components.interfaces.nsIObserverService);
observerService.addObserver(cookieIconObserver, "cookieIcon", false);
// determine whether or not cookie icon in this new window should be displayed
var cookieservice = Components.classes["@mozilla.org/cookieService;1"].getService();
cookieservice = cookieservice.QueryInterface(Components.interfaces.nsICookieService);
if (cookieservice.cookieIconIsVisible) {
var cookieIcon = document.getElementById("privacy-button");
if (cookieIcon) {
cookieIcon.removeAttribute("hidden");
}
}
}
}
function CookieTasksOnUnload(event) {
if ("@mozilla.org/cookie-consent;1" in Components.classes) {
var observerService = Components.classes["@mozilla.org/observer-service;1"].getService(Components.interfaces.nsIObserverService);
observerService.removeObserver(cookieIconObserver, "cookieIcon", false);
}
}
addEventListener("load", CookieTasksOnLoad, false);
]]>
</script>
<!-- statusbarOverlay items -->
<statusbar id="status-bar">
<statusbarpanel class="statusbarpanel-iconic" id="privacy-button"
hidden="true" insertbefore="security-button"
oncommand="viewP3PDialog()" tooltiptext="&cookieIcon.label;"/>
</statusbar>
</overlay>

View File

@@ -1,262 +0,0 @@
<?xml version="1.0"?>
<!--
- Version: MPL 1.1/GPL 2.0/LGPL 2.1
-
- ***** BEGIN LICENSE BLOCK *****
- Version: MPL 1.1/GPL 2.0/LGPL 2.1
-
- The contents of this file are subject to the Mozilla Public License Version
- 1.1 (the "License"); you may not use this file except in compliance with
- the License. You may obtain a copy of the License at
- http://www.mozilla.org/MPL/
-
- Software distributed under the License is distributed on an "AS IS" basis,
- WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- for the specific language governing rights and limitations under the
- License.
-
- The Original Code is Mozilla.org code.
-
- The Initial Developer of the Original Code is
- Netscape Communications Corp.
- Portions created by the Initial Developer are Copyright (C) 2001
- the Initial Developer. All Rights Reserved.
-
- Contributor(s):
-
- Alternatively, the contents of this file may be used under the terms of
- either the GNU General Public License Version 2 or later (the "GPL"), or
- the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- in which case the provisions of the GPL or the LGPL are applicable instead
- of those above. If you wish to allow use of your version of this file only
- under the terms of either the GPL or the LGPL, and not to allow others to
- use your version of this file under the terms of the MPL, indicate your
- decision by deleting the provisions above and replace them with the notice
- and other provisions required by the GPL or the LGPL. If you do not delete
- the provisions above, a recipient may use your version of this file under
- the terms of any one of the MPL, the GPL or the LGPL.
-
- ***** END LICENSE BLOCK ***** -->
<!-- CHANGE THIS WHEN MOVING FILES -->
<?xml-stylesheet href="chrome://communicator/skin/" type="text/css"?>
<!-- CHANGE THIS WHEN MOVING FILES -->
<!DOCTYPE dialog SYSTEM "chrome://cookie/locale/p3p.dtd">
<dialog id="privacySettings"
buttons="accept,cancel,help"
title="&windowtitle.label;"
xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
onload="init();"
ondialogaccept="return onOK();"
ondialoghelp="return doHelpButton();"
style="width: 45em;">
<script type="application/x-javascript" src="chrome://help/content/contextHelp.js" />
<script type="application/x-javascript">
<![CDATA[
var pref;
var low = 0;
var medium = 1;
var high = 2;
var custom = 3;
var p3pLength = 8;
function init()
{
// get pref service
pref = Components.classes['@mozilla.org/preferences-service;1'];
pref = pref.getService();
pref = pref.QueryInterface(Components.interfaces.nsIPrefBranch);
var p3pLevel = medium;
try {
// set prefLevel radio button
p3pLevel = pref.getIntPref("network.cookie.p3plevel");
document.getElementById("p3pLevel").value = p3pLevel;
// set custom settings
if (p3pLevel == custom) {
for (var i=0; i<p3pLength; i++) {
document.getElementById("menulist_"+i).value =
pref.getCharPref("network.cookie.p3p").charAt(i);
}
}
} catch(e) {
}
// initialize the settings display
settings(p3pLevel);
}
function onOK(){
var p3pLevel = document.getElementById("p3pLevel").value;
pref.setIntPref("network.cookie.p3plevel", p3pLevel);
var value = "";
for (var i=0; i<p3pLength; i++) {
value += document.getElementById("menulist_"+i).value;
}
pref.setCharPref("network.cookie.p3p", value);
return true;
}
function settings(level) {
var settings = [];
switch (level) {
case low:
settings = "afafaaaa";
break;
case medium:
settings = "ffffaaaa";
break;
case high:
settings = "frfradaa";
break;
case custom:
break;
}
var hide = (level != custom);
var menulist;
for (var j=0; j<p3pLength; j++) {
menulist = document.getElementById("menulist_" + j);
menulist.disabled = hide;
if (hide) {
menulist.value = settings[j];
}
}
}
function doHelpButton()
{
openHelp('privacy_levels');
}
]]>
</script>
<groupbox orient="vertical">
<caption label="&privacyLevel.label;"/>
<description>&p3pDetails;</description>
<spacer/>
<description>&choose;</description>
<radiogroup id="p3pLevel" orient="horizontal" align="center">
<radio group="p3pLevel" value="0" label="&low.label;"
accesskey="&low.accesskey;" oncommand="settings(low);"/>
<radio group="p3pLevel" value="1" label="&medium.label;"
accesskey="&medium.accesskey;" oncommand="settings(medium);"/>
<radio group="p3pLevel" value="2" label="&high.label;"
accesskey="&high.accesskey;" oncommand="settings(high);"/>
<radio group="p3pLevel" value="3" label="&custom.label;"
accesskey="&custom.accesskey;" oncommand="settings(custom);"/>
</radiogroup>
</groupbox>
<groupbox id="customSettingBox" orient="vertical">
<caption label="&customSettings.label;"/>
<grid>
<columns>
<column flex="1"/>
<column width="120"/>
<column width="120"/>
</columns>
<rows>
<row align="center">
<spacer/>
<description>&firstParty.label;</description>
<description>&thirdParty.label;</description>
</row>
<row align="center">
<description>&noPolicy.label;</description>
<menulist flex="1" id="menulist_0">
<menupopup>
<menuitem value="a" label="&accept.label;"/>
<menuitem value="f" label="&flag.label;"/>
<menuitem value="d" label="&downgrade.label;"/>
<menuitem value="r" label="&reject.label;"/>
</menupopup>
</menulist>
<menulist flex="1" id="menulist_1">
<menupopup>
<menuitem value="a" label="&accept.label;"/>
<menuitem value="f" label="&flag.label;"/>
<menuitem value="d" label="&downgrade.label;"/>
<menuitem value="r" label="&reject.label;"/>
</menupopup>
</menulist>
</row>
<row align="center">
<description>&noConsent.label;</description>
<menulist flex="1" id="menulist_2">
<menupopup>
<menuitem value="a" label="&accept.label;"/>
<menuitem value="f" label="&flag.label;"/>
<menuitem value="d" label="&downgrade.label;"/>
<menuitem value="r" label="&reject.label;"/>
</menupopup>
</menulist>
<menulist flex="1" id="menulist_3">
<menupopup>
<menuitem value="a" label="&accept.label;"/>
<menuitem value="f" label="&flag.label;"/>
<menuitem value="d" label="&downgrade.label;"/>
<menuitem value="r" label="&reject.label;"/>
</menupopup>
</menulist>
</row>
<row align="center">
<description>&implicitConsent.label;</description>
<menulist flex="1" id="menulist_4">
<menupopup>
<menuitem value="a" label="&accept.label;"/>
<menuitem value="f" label="&flag.label;"/>
<menuitem value="d" label="&downgrade.label;"/>
<menuitem value="r" label="&reject.label;"/>
</menupopup>
</menulist>
<menulist flex="1" id="menulist_5">
<menupopup>
<menuitem value="a" label="&accept.label;"/>
<menuitem value="f" label="&flag.label;"/>
<menuitem value="d" label="&downgrade.label;"/>
<menuitem value="r" label="&reject.label;"/>
</menupopup>
</menulist>
</row>
<row align="center">
<description>&explicitConsent.label;</description>
<menulist flex="1" id="menulist_6">
<menupopup>
<menuitem value="a" label="&accept.label;"/>
<menuitem value="f" label="&flag.label;"/>
<menuitem value="d" label="&downgrade.label;"/>
<menuitem value="r" label="&reject.label;"/>
</menupopup>
</menulist>
<menulist flex="1" id="menulist_7">
<menupopup>
<menuitem value="a" label="&accept.label;"/>
<menuitem value="f" label="&flag.label;"/>
<menuitem value="d" label="&downgrade.label;"/>
<menuitem value="r" label="&reject.label;"/>
</menupopup>
</menulist>
</row>
</rows>
</grid>
</groupbox>
</dialog>

View File

@@ -1,113 +0,0 @@
<?xml version="1.0"?>
<!--
- Version: MPL 1.1/GPL 2.0/LGPL 2.1
-
- ***** BEGIN LICENSE BLOCK *****
- Version: MPL 1.1/GPL 2.0/LGPL 2.1
-
- The contents of this file are subject to the Mozilla Public License Version
- 1.1 (the "License"); you may not use this file except in compliance with
- the License. You may obtain a copy of the License at
- http://www.mozilla.org/MPL/
-
- Software distributed under the License is distributed on an "AS IS" basis,
- WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- for the specific language governing rights and limitations under the
- License.
-
- The Original Code is Mozilla.org code.
-
- The Initial Developer of the Original Code is
- Netscape Communications Corp.
- Portions created by the Initial Developer are Copyright (C) 2001
- the Initial Developer. All Rights Reserved.
-
- Contributor(s):
-
- Alternatively, the contents of this file may be used under the terms of
- either the GNU General Public License Version 2 or later (the "GPL"), or
- the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- in which case the provisions of the GPL or the LGPL are applicable instead
- of those above. If you wish to allow use of your version of this file only
- under the terms of either the GPL or the LGPL, and not to allow others to
- use your version of this file under the terms of the MPL, indicate your
- decision by deleting the provisions above and replace them with the notice
- and other provisions required by the GPL or the LGPL. If you do not delete
- the provisions above, a recipient may use your version of this file under
- the terms of any one of the MPL, the GPL or the LGPL.
-
- ***** END LICENSE BLOCK ***** -->
<!-- CHANGE THIS WHEN MOVING FILES -->
<?xml-stylesheet href="chrome://communicator/skin/" type="text/css"?>
<!-- CHANGE THIS WHEN MOVING FILES -->
<!DOCTYPE dialog SYSTEM "chrome://cookie/locale/p3p.dtd">
<dialog id="p3pDialog"
buttons="accept,cancel,extra1,extra2,help"
buttonalign="center"
buttonlabelaccept="&p3pDialogOff.label;"
buttonlabelcancel="&p3pDialogClose.label;"
buttonlabelextra1="&p3pDialogViewCookies.label;"
buttonlabelextra2="&p3pDialogViewLevels.label;"
title="&p3pDialogTitle.label;"
xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
onload="init();"
ondialogaccept="return P3POff();"
ondialogextra1="ViewCookieManager();"
ondialogextra2="ViewPrivacyLevels();"
ondialoghelp="return doHelpButton();"
style="width: 45em;">
<script type="application/x-javascript" src="chrome://help/content/contextHelp.js" />
<script type="application/x-javascript">
<![CDATA[
function init()
{
window.arguments[0].gButtonPressed = "";
// focus on the cancel button
document.documentElement.getButton("cancel").focus();
}
function ViewCookieManager() {
window.arguments[0].gButtonPressed = "cookie";
window.close();
}
function ViewPrivacyLevels() {
window.arguments[0].gButtonPressed = "p3p";
window.close();
}
function P3POff() {
var pref = Components.classes['@mozilla.org/preferences-service;1'];
pref = pref.getService();
pref = pref.QueryInterface(Components.interfaces.nsIPrefBranch);
pref.setIntPref("network.cookie.cookieBehavior", 0);
return true;
}
function doHelpButton()
{
openHelp('cookie_notify');
}
]]>
</script>
<description>&p3pDialogMessage1.label;</description>
<separator class="thin"/>
<box>
<spacer flex="1"/>
<image src="chrome://communicator/skin/cookie/status-cookie.gif"/>
<spacer flex="1"/>
</box>
<separator class="thin"/>
<description>&p3pDialogMessage2.label;</description>
</dialog>

View File

@@ -1,163 +0,0 @@
<?xml version="1.0"?>
<!-- ***** BEGIN LICENSE BLOCK *****
Version: MPL 1.1/GPL 2.0/LGPL 2.1
The contents of this file are subject to the Mozilla Public License Version
1.1 (the "License"); you may not use this file except in compliance with
the License. You may obtain a copy of the License at
http://www.mozilla.org/MPL/
Software distributed under the License is distributed on an "AS IS" basis,
WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
for the specific language governing rights and limitations under the
License.
The Original Code is Mozilla Communicator client code, released
March 31, 1998.
The Initial Developer of the Original Code is
Netscape Communications Corporation.
Portions created by the Initial Developer are Copyright (C) 1998-1999
the Initial Developer. All Rights Reserved.
Contributor(s):
Håkan Waara <hwaara@chello.se>
Peter Annema <disttsc@bart.nl>
Alternatively, the contents of this file may be used under the terms of
either the GNU General Public License Version 2 or later (the "GPL"), or
the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
in which case the provisions of the GPL or the LGPL are applicable instead
of those above. If you wish to allow use of your version of this file only
under the terms of either the GPL or the LGPL, and not to allow others to
use your version of this file under the terms of the MPL, indicate your
decision by deleting the provisions above and replace them with the notice
and other provisions required by the GPL or the LGPL. If you do not delete
the provisions above, a recipient may use your version of this file under
the terms of any one of the MPL, the GPL or the LGPL.
***** END LICENSE BLOCK ***** -->
<?xml-stylesheet href="chrome://communicator/skin/" type="text/css"?>
<!DOCTYPE page SYSTEM "chrome://cookie/locale/pref-cookies.dtd">
<page id="cookiesPanel" xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
onload="init();"
headertitle="&lHeader;">
<script type="application/x-javascript" src="chrome://cookie/content/cookieOverlay.js"/>
<script type="application/x-javascript">
<![CDATA[
var panel = "chrome://cookie/content/pref-cookies.xul";
var _elementIDs = ["networkCookieBehavior", "networkCookieLifetime",
"alwaysAcceptSession", "lifetimeDays"];
function init()
{
parent.initPanel('chrome://cookie/content/pref-cookies.xul');
setDisables(false);
const NS_COOKIECONSENT_CONTRACTID = '@mozilla.org/cookie-consent;1';
if (NS_COOKIECONSENT_CONTRACTID in Components.classes) {
var p3pRadioButton = document.getElementById("p3pRadioButton");
p3pRadioButton.removeAttribute("hidden");
}
}
const cookies_disabled = "2";
const cookies_no_third_party = "1";
const cookies_p3p = "3";
const cookies_enabled = "0";
const accept_normally = "0";
const accept_session = "2";
const accept_for_n_days = "3";
const ask_before_accepting = "1";
function setDisables(setFocus)
{
var cookieBehavior = document.getElementById("networkCookieBehavior");
var p3pButton = document.getElementById("p3pDialog");
p3pButton.disabled = (cookieBehavior.value != cookies_p3p);
if (parent.hPrefWindow.getPrefIsLocked(p3pButton.getAttribute("prefstring")) )
p3pButton.disabled = true;
var cookieLifetime = document.getElementById("networkCookieLifetime");
var lifetimeDays = document.getElementById("lifetimeDays");
var alwaysAcceptSession = document.getElementById("alwaysAcceptSession");
var cookiesDisabled = (cookieBehavior.value == cookies_disabled);
cookieLifetime.disabled = cookiesDisabled;
lifetimeDays.disabled = cookiesDisabled || (cookieLifetime.value != accept_for_n_days);
alwaysAcceptSession.disabled = cookiesDisabled || (cookieLifetime.value != ask_before_accepting);
if (parent.hPrefWindow.getPrefIsLocked(alwaysAcceptSession.getAttribute("prefstring")) )
alwaysAcceptSession.disabled = true;
if (parent.hPrefWindow.getPrefIsLocked(lifetimeDays.getAttribute("prefstring")) )
lifetimeDays.disabled = true;
if (parent.hPrefWindow.getPrefIsLocked(cookieLifetime.getAttribute("prefstring")) )
cookieLifetime.disabled = true;
if (!lifetimeDays.disabled && setFocus)
lifetimeDays.focus();
}
]]>
</script>
<groupbox id="networkCookieAcceptPolicy">
<caption label="&cookiePolicy.label;"/>
<radiogroup id="networkCookieBehavior"
prefstring="network.cookie.cookieBehavior">
<radio value="2" label="&disableCookies.label;"
accesskey="&disableCookies.accesskey;" oncommand="setDisables(false);"/>
<radio value="1" label="&accOrgCookiesRadio.label;"
accesskey="&accOrgCookiesRadio.accesskey;" oncommand="setDisables(false);"/>
<hbox id="p3pRadioButton" hidden="true">
<radio value="3" label="&accP3PCookiesRadio.label;"
accesskey="&accP3PCookiesRadio.accesskey;" oncommand="setDisables(false);"/>
<button label="&viewP3P.label;" accesskey="&viewP3P.accesskey;" oncommand="viewP3P();"
id="p3pDialog"
prefstring="pref.advanced.cookies.disable_button.more_info"/>
</hbox>
<radio value="0" label="&accAllCookiesRadio.label;"
accesskey="&accAllCookiesRadio.accesskey;" oncommand="setDisables(false);"/>
</radiogroup>
</groupbox>
<groupbox id="networkCookieLifetimePolicy">
<caption label="&cookieRetentionPolicy.label;"/>
<radiogroup id="networkCookieLifetime"
prefstring="network.cookie.lifetimePolicy">
<radio value="0" label="&acceptNormally.label;" accesskey="&acceptNormally.accesskey;" oncommand="setDisables(false);"/>
<radio value="2" label="&acceptForSession.label;" accesskey="&acceptForSession.accesskey;" oncommand="setDisables(false);"/>
<hbox align="center">
<radio value="3" accesskey="&acceptforNDays.accesskey;" label="&acceptforNDays.label;"
oncommand="setDisables(true);"/>
<textbox id="lifetimeDays" pref="true" size="4"
preftype="int" prefstring="network.cookie.lifetime.days"/>
<label value="&days.label;" control="lifetimeDays"/>
</hbox>
<hbox>
<radio value="1" label="&warnAboutCookies.label;"
accesskey="&warnAboutCookies.accesskey;" oncommand="setDisables(false);"/>
<checkbox id="alwaysAcceptSession" label="&forCurrentSession.label;"
accesskey="&forCurrentSession.accesskey;"
prefstring="network.cookie.alwaysAcceptSessionCookies"/>
</hbox>
</radiogroup>
</groupbox>
<groupbox id="manageCookiesAndSites">
<caption label="&manageCookies.label;"/>
<description>&manageCookiesDescription.label;</description>
<hbox pack="end">
<button label="&viewCookies.label;" accesskey="&viewCookies.accesskey;" oncommand="viewCookies();"
id="viewCookieButton"
prefstring="pref.advanced.cookies.disable_button.view_cookies"/>
</hbox>
</groupbox>
</page>

View File

@@ -1,258 +0,0 @@
<?xml version="1.0"?>
<!-- ***** BEGIN LICENSE BLOCK *****
- Version: MPL 1.1/GPL 2.0/LGPL 2.1
-
- The contents of this file are subject to the Mozilla Public License Version
- 1.1 (the "License"); you may not use this file except in compliance with
- the License. You may obtain a copy of the License at
- http://www.mozilla.org/MPL/
-
- Software distributed under the License is distributed on an "AS IS" basis,
- WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- for the specific language governing rights and limitations under the
- License.
-
- The Original Code is mozilla.org code.
-
- The Initial Developer of the Original Code is
- Netscape Communications Corporation.
- Portions created by the Initial Developer are Copyright (C) 2002
- the Initial Developer. All Rights Reserved.
-
- Contributor(s):
-
- Alternatively, the contents of this file may be used under the terms of
- either the GNU General Public License Version 2 or later (the "GPL"), or
- the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- in which case the provisions of the GPL or the LGPL are applicable instead
- of those above. If you wish to allow use of your version of this file only
- under the terms of either the GPL or the LGPL, and not to allow others to
- use your version of this file under the terms of the MPL, indicate your
- decision by deleting the provisions above and replace them with the notice
- and other provisions required by the LGPL or the GPL. If you do not delete
- the provisions above, a recipient may use your version of this file under
- the terms of any one of the MPL, the GPL or the LGPL.
-
- ***** END LICENSE BLOCK ***** -->
<?xml-stylesheet href="chrome://communicator/skin/" type="text/css"?>
<!DOCTYPE page [
<!ENTITY % prefPopupsDTD SYSTEM "chrome://cookie/locale/pref-popups.dtd" >
%prefPopupsDTD;
]>
<page xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
id="popupsPanel"
onload="parent.initPanel('chrome://cookie/content/pref-popups.xul');"
headertitle="&title;">
<script type="application/x-javascript">
<![CDATA[
var _elementIDs = ["popupPolicy","playSound","playSoundUrl","displayIcon","removeBlacklist","prefillWhitelist"];
const nsIPermissionManager = Components.interfaces.nsIPermissionManager
const popupType = "popup";
var gPolicyCheckbox;
var gSoundCheckbox;
var gSoundUrlBox;
var gSoundUrlButton;
var gPreviewSoundButton;
var gIconCheckbox;
var permissionManager;
var ioService;
function Startup() {
permissionManager = Components.classes["@mozilla.org/permissionmanager;1"]
.getService(Components.interfaces.nsIPermissionManager);
ioService = Components.classes["@mozilla.org/network/io-service;1"]
.getService(Components.interfaces.nsIIOService);
gPolicyCheckbox = document.getElementById("popupPolicy");
gSoundCheckbox = document.getElementById("playSound");
gSoundUrlBox = document.getElementById("playSoundUrl");
gSoundUrlButton = document.getElementById("selectSound");
gPreviewSoundButton = document.getElementById("previewSound");
gIconCheckbox = document.getElementById("displayIcon");
var removeBlacklist = (document.getElementById("removeBlacklist").getAttribute("value") == "true");
if (removeBlacklist) {
clearBlacklist();
document.getElementById("removeBlacklist").setAttribute("value", false);
}
var prefillWhitelist = (document.getElementById("prefillWhitelist").getAttribute("value") == "true");
if (prefillWhitelist) {
loadWhitelist();
document.getElementById("prefillWhitelist").setAttribute("value", false);
}
if (parent.queuedTag == "chrome://cookie/content/pref-popups.xul") {
// opened from About Popups menuitem
gPolicyCheckbox.checked = true;
parent.queuedTag = null;
}
setButtons();
}
function clearBlacklist() {
var enumerator = permissionManager.enumerator;
var hosts = [];
while (enumerator.hasMoreElements()) {
var permission = enumerator.getNext();
if (permission) {
permission = permission.QueryInterface(Components.interfaces.nsIPermission);
if ((permission.type == popupType) && (permission.capability == nsIPermissionManager.DENY_ACTION))
hosts[hosts.length] = permission.host;
}
}
for (var i = 0; i < hosts.length; i++) {
permissionManager.remove(hosts[i], popupType);
}
}
function loadWhitelist() {
try {
var whitelist;
var hosts;
var prefService = Components.classes["@mozilla.org/preferences-service;1"]
.getService(Components.interfaces.nsIPrefService);
var prefs = prefService.getBranch(null);
whitelist = prefs.getComplexValue("privacy.popups.default_whitelist",
Components.interfaces.nsIPrefLocalizedString).data;
hosts = whitelist.split(",");
for (var i = 0; i < hosts.length; i++) {
var host = hosts[i];
host = "http://" + host;
var uri = ioService.newURI(host, null, null);
permissionManager.add(uri, popupType, true);
}
}
catch (ex) { }
}
function setButtons() {
var exceptionsButton = document.getElementById("exceptionsButton");
exceptionsButton.disabled = !gPolicyCheckbox.checked;
if (!gPolicyCheckbox.checked) {
gSoundCheckbox.disabled = true;
gSoundUrlBox.disabled = true;
gSoundUrlButton.disabled = true;
gPreviewSoundButton.disabled = true;
gIconCheckbox.disabled = true;
}
else {
gSoundCheckbox.disabled = false;
gSoundUrlBox.disabled = false;
gSoundUrlButton.disabled = false;
gPreviewSoundButton.disabled = false;
gIconCheckbox.disabled = false;
enableSoundUrl(gSoundCheckbox.checked);
}
}
function selectSound() {
var nsIFilePicker = Components.interfaces.nsIFilePicker;
var filepicker = Components.classes["@mozilla.org/filepicker;1"]
.createInstance(nsIFilePicker);
filepicker.init(window, document.getElementById("selectSound").getAttribute("filepickertitle"), nsIFilePicker.modeOpen);
filepicker.appendFilters(nsIFilePicker.filterAll);
var ret = filepicker.show();
if (ret == nsIFilePicker.returnOK)
gSoundUrlBox.value = filepicker.file.path;
onSoundInput();
}
function previewSound() {
var soundUrl = gSoundUrlBox.value;
var sound = Components.classes["@mozilla.org/sound;1"]
.createInstance(Components.interfaces.nsISound);
if (soundUrl.indexOf("file://") == -1) {
sound.playSystemSound(soundUrl);
}
else {
var url = Components.classes["@mozilla.org/network/standard-url;1"]
.createInstance(Components.interfaces.nsIURL);
url.spec = soundUrl;
sound.play(url)
}
}
function enableSoundUrl(soundChecked) {
gSoundUrlBox.disabled = !soundChecked;
gSoundUrlButton.disabled = !soundChecked;
if (soundChecked && gSoundUrlBox.value) {
gPreviewSoundButton.disabled = false;
}
else
gPreviewSoundButton.disabled = true;
}
function onSoundInput() {
gPreviewSoundButton.disabled = gSoundUrlBox.value == "";
}
function viewPopups() {
window.openDialog("chrome://communicator/content/popupManager.xul", "",
"chrome,resizable=yes", "");
}
]]>
</script>
<groupbox id="popupsArea">
<caption label="&popupBlocking.label;"/>
<hbox align="center">
<checkbox id="popupPolicy" label="&popupBlock.label;" accesskey="&popupBlock.accesskey;"
oncommand="setButtons()"
preftype="bool" prefstring="dom.disable_open_during_load"
prefattribute="checked"/>
<spacer flex="1"/>
<button id="exceptionsButton" label="&popupExceptions.label;"
accesskey="&popupExceptions.accesskey;"
oncommand="viewPopups();"/>
</hbox>
<separator class="thin"/>
<description id="whenBlock">&whenBlock.description;</description>
<hbox align="center">
<checkbox id="playSound" label="&playSound.label;"
oncommand="enableSoundUrl(this.checked);"
preftype="bool" prefstring="privacy.popups.sound_enabled"
prefattribute="checked"/>
</hbox>
<hbox align="center">
<textbox flex="1" id="playSoundUrl"
prefstring="privacy.popups.sound_url" oninput="onSoundInput()"/>
<button id="selectSound" label="&selectSound.label;" accesskey="&selectSound.accesskey;"
filepickertitle="&selectSound.title;" oncommand="selectSound();"/>
<button id="previewSound" label="&previewSound.label;" accesskey="&previewSound.accesskey;"
oncommand="previewSound();"/>
</hbox>
<hbox align="center">
<checkbox id="displayIcon" label="&displayIcon.label;"
preftype="bool" prefstring="privacy.popups.statusbar_icon_enabled"
prefattribute="checked"/>
</hbox>
<separator class="thin"/>
<description>&popupNote.description;</description>
<data id="prefillWhitelist" preftype="bool" prefattribute="value" prefstring="privacy.popups.prefill_whitelist"/>
<data id="removeBlacklist" preftype="bool" prefattribute="value" prefstring="privacy.popups.remove_blacklist"/>
</groupbox>
</page>

View File

@@ -1,26 +0,0 @@
<?xml version="1.0"?>
<RDF:RDF xmlns:RDF="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:chrome="http://www.mozilla.org/rdf/chrome#">
<!-- list all the packages being supplied by this jar -->
<RDF:Seq about="urn:mozilla:locale:root">
<RDF:li resource="urn:mozilla:locale:en-US"/>
</RDF:Seq>
<!-- locale information -->
<RDF:Description about="urn:mozilla:locale:en-US"
chrome:displayName="English (US)"
chrome:author="mozilla.org"
chrome:name="en-US">
<chrome:packages>
<RDF:Seq about="urn:mozilla:locale:en-US:packages">
<RDF:li resource="urn:mozilla:locale:en-US:cookie"/>
</RDF:Seq>
</chrome:packages>
</RDF:Description>
<!-- Version Information. State that we work only with major version of this
package. -->
<RDF:Description about="urn:mozilla:locale:en-US:cookie"
#expand chrome:localeVersion="__MOZILLA_LOCALE_VERSION__"/>
</RDF:RDF>

View File

@@ -1,46 +0,0 @@
# ***** BEGIN LICENSE BLOCK *****
# Version: MPL 1.1/GPL 2.0/LGPL 2.1
#
# The contents of this file are subject to the Mozilla Public License Version
# 1.1 (the "License"); you may not use this file except in compliance with
# the License. You may obtain a copy of the License at
# http://www.mozilla.org/MPL/
#
# Software distributed under the License is distributed on an "AS IS" basis,
# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
# for the specific language governing rights and limitations under the
# License.
#
# The Original Code is mozilla.org code.
#
# The Initial Developer of the Original Code is
# Netscape Communications Corporation.
# Portions created by the Initial Developer are Copyright (C) 1998
# the Initial Developer. All Rights Reserved.
#
# Contributor(s):
#
# Alternatively, the contents of this file may be used under the terms of
# either the GNU General Public License Version 2 or later (the "GPL"), or
# the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
# in which case the provisions of the GPL or the LGPL are applicable instead
# of those above. If you wish to allow use of your version of this file only
# under the terms of either the GPL or the LGPL, and not to allow others to
# use your version of this file under the terms of the MPL, indicate your
# decision by deleting the provisions above and replace them with the notice
# and other provisions required by the GPL or the LGPL. If you do not delete
# the provisions above, a recipient may use your version of this file under
# the terms of any one of the MPL, the GPL or the LGPL.
#
# ***** END LICENSE BLOCK *****
Domain = Domain
Host = Host
Yes = Yes
No = No
AtEndOfSession = at end of session
Confirm = Confirm
PermissionToAcceptImage = The site %s wants to load an image. Do you want to allow it?
RememberThisDecision = Remember this decision

View File

@@ -1,20 +0,0 @@
<!ENTITY props.box.label "About this cookie">
<!ENTITY props.name.label "Name:">
<!ENTITY props.value.label "Content:">
<!ENTITY props.domain.label "Host:">
<!ENTITY props.path.label "Path:">
<!ENTITY props.secure.label "Send For:">
<!ENTITY props.expires.label "Expires:">
<!ENTITY props.policy.label "Policy:">
<!ENTITY button.allow.label "Allow">
<!ENTITY button.allow.accesskey "A">
<!ENTITY button.session.label "Allow for Session">
<!ENTITY button.session.accesskey "S">
<!ENTITY button.deny.label "Deny">
<!ENTITY button.deny.accesskey "D">
<!ENTITY dialog.title "Confirm setting cookie">
<!ENTITY dialog.remember.label "Use my choice for all cookies from this site">
<!ENTITY dialog.remember.accesskey "U">

View File

@@ -1,17 +0,0 @@
hostColon=Host:
domainColon=Domain:
forSecureOnly=Encrypted connections only
forAnyConnection=Any type of connection
atEndOfSession=at end of session
showDetails=Show Details
hideDetails=Hide Details
detailsAccessKey=T
permissionToSetACookie = The site %S wants to set a cookie.
permissionToSetSecondCookie = The site %S wants to set a second cookie.
# LOCALIZATION NOTE (PermissionToSetAnotherCookie): First %S: sitename, second %S: number of cookies already present for that site
permissionToSetAnotherCookie = The site %S wants to set another cookie.\nYou already have %S cookies from this site.
permissionToModifyCookie = The site %S wants to modify an existing cookie.
permissionToAcceptImage = The site %S wants to load an image.
rememberThisDecision = Remember this decision

View File

@@ -1,4 +0,0 @@
<!ENTITY blockImageCmd.label "Block Images from this Server">
<!ENTITY blockImageCmd.accesskey "k">
<!ENTITY unblockImageCmd.label "Unblock Images from this Server">
<!ENTITY unblockImageCmd.accesskey "u">

View File

@@ -1,47 +0,0 @@
<!-- the following is for the task menu overlay -->
<!ENTITY cookieMessageTitle.label "Cookie Permissions Changed">
<!ENTITY cookieDisplayCookiesCmd.label "Manage Stored Cookies">
<!ENTITY cookieDisplayCookiesCmd.accesskey "M">
<!ENTITY cookieAllowCookiesCmd.label "Allow Cookies from this Site">
<!ENTITY cookieAllowCookiesCmd.accesskey "A">
<!ENTITY cookieAllowCookiesMsg.label "Cookies from this site will always be allowed.">
<!ENTITY cookieAllowSessionCookiesCmd.label "Allow Session Cookies from this Site">
<!ENTITY cookieAllowSessionCookiesCmd.accesskey "S">
<!ENTITY cookieAllowSessionCookiesMsg.label "This site will be able to set cookies for the current session only.">
<!ENTITY cookieCookiesDefaultCmd.label "Use Default Cookie Permissions">
<!ENTITY cookieCookiesDefaultCmd.accesskey "U">
<!ENTITY cookieCookiesDefaultMsg.label "Cookies from this site will be accepted or rejected based on default settings.">
<!ENTITY cookieBlockCookiesCmd.label "Block Cookies from this Site">
<!ENTITY cookieBlockCookiesCmd.accesskey "B">
<!ENTITY cookieBlockCookiesMsg.label "Cookies from this site will always be rejected.">
<!ENTITY cookieImageMessageTitle.label "Image Permissions Changed">
<!ENTITY cookieDisplayImagesCmd.label "Manage Image Permissions">
<!ENTITY cookieDisplayImagesCmd.accesskey "M">
<!ENTITY cookieAllowImagesCmd.label "Allow Images from this Site">
<!ENTITY cookieAllowImagesCmd.accesskey "A">
<!ENTITY cookieAllowImagesMsg.label "Images from this site will always be downloaded.">
<!ENTITY cookieImagesDefaultCmd.label "Use Default Image Permissions">
<!ENTITY cookieImagesDefaultCmd.accesskey "U">
<!ENTITY cookieImagesDefaultMsg.label "Images from this site will be downloaded based on default settings.">
<!ENTITY cookieBlockImagesCmd.label "Block Images from this Site">
<!ENTITY cookieBlockImagesCmd.accesskey "B">
<!ENTITY cookieBlockImagesMsg.label "Images from this site will never be downloaded.">
<!ENTITY cookieAllowPopupsCmd.label "Allow Popups From This Site">
<!ENTITY cookieAllowPopupsCmd.accesskey "A">
<!ENTITY cookieAboutPopupBlocking.label "About Popup Blocking">
<!ENTITY cookieAboutPopupBlocking.accesskey "b">
<!ENTITY cookieManagePopups.label "Manage Popups">
<!ENTITY cookieManagePopups.accesskey "M">
<!ENTITY cookieTutorialCmd.label "Understanding Privacy">
<!ENTITY cookieTutorialCmd.accesskey "u">
<!ENTITY cookieCookieManager.label "Cookie Manager">
<!ENTITY cookieCookieManager.accesskey "c">
<!ENTITY cookieImageManager.label "Image Manager">
<!ENTITY cookieImageManager.accesskey "i">
<!ENTITY cookiePopupManager.label "Popup Manager">
<!ENTITY cookiePopupManager.accesskey "o">

View File

@@ -1,3 +0,0 @@
<!ENTITY cookies.label "Cookies">
<!ENTITY images.label "Images">
<!ENTITY popups.label "Popup Windows">

View File

@@ -1,3 +0,0 @@
<!-- the following is for the statusbar overlay -->
<!ENTITY cookieIcon.label "Show cookie information">

View File

@@ -1,75 +0,0 @@
<!-- -*- Mode: SGML; indent-tabs-mode: nil; -*- -->
<!--
- Version: MPL 1.1/GPL 2.0/LGPL 2.1
-
- ***** BEGIN LICENSE BLOCK *****
- Version: MPL 1.1/GPL 2.0/LGPL 2.1
-
- The contents of this file are subject to the Mozilla Public License Version
- 1.1 (the "License"); you may not use this file except in compliance with
- the License. You may obtain a copy of the License at
- http://www.mozilla.org/MPL/
-
- Software distributed under the License is distributed on an "AS IS" basis,
- WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- for the specific language governing rights and limitations under the
- License.
-
- The Original Code is Mozilla.org code.
-
- The Initial Developer of the Original Code is
- Netscape Communications Corp.
- Portions created by the Initial Developer are Copyright (C) 2001
- the Initial Developer. All Rights Reserved.
-
- Contributor(s):
-
- Alternatively, the contents of this file may be used under the terms of
- either the GNU General Public License Version 2 or later (the "GPL"), or
- the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- in which case the provisions of the GPL or the LGPL are applicable instead
- of those above. If you wish to allow use of your version of this file only
- under the terms of either the GPL or the LGPL, and not to allow others to
- use your version of this file under the terms of the MPL, indicate your
- decision by deleting the provisions above and replace them with the notice
- and other provisions required by the GPL or the LGPL. If you do not delete
- the provisions above, a recipient may use your version of this file under
- the terms of any one of the MPL, the GPL or the LGPL.
-
- ***** END LICENSE BLOCK ***** -->
<!ENTITY windowtitle.label "Privacy Settings">
<!ENTITY privacyLevel.label "Level of Privacy">
<!ENTITY p3pDetails "Some sites publish privacy policies stating what they will do with your personal information. This dialog allows you to make cookie decisions based on the level of privacy that you are willing to accept.">
<!ENTITY choose "Choose a predefined level of privacy, or define your own custom setting:">
<!ENTITY low.label "low">
<!ENTITY medium.label "medium">
<!ENTITY high.label "high">
<!ENTITY custom.label "custom">
<!ENTITY low.accesskey "l">
<!ENTITY medium.accesskey "m">
<!ENTITY high.accesskey "h">
<!ENTITY custom.accesskey "c">
<!ENTITY customSettings.label "Cookie Acceptance Policy (a function of Level of Privacy)">
<!ENTITY firstParty.label "First Party Cookies">
<!ENTITY thirdParty.label "Third Party Cookies">
<!ENTITY noPolicy.label "Site has no privacy policy">
<!ENTITY noConsent.label "Site collects personally identifiable information without your consent">
<!ENTITY implicitConsent.label "Site collects personally identifiable information with only your implicit consent">
<!ENTITY explicitConsent.label "Site does not collect personally identifiable information without your explicit consent">
<!ENTITY accept.label "Accept">
<!ENTITY flag.label "Flag">
<!ENTITY downgrade.label "Session">
<!ENTITY reject.label "Reject">
<!ENTITY showIcon.label "Show warning icon when Cookie Acceptance Policy is triggered">
<!ENTITY p3pDialogTitle.label "Cookie Notification">
<!ENTITY p3pDialogOff.label "Allow All Cookies">
<!ENTITY p3pDialogClose.label "Close">
<!ENTITY p3pDialogViewCookies.label "View Cookie Manager">
<!ENTITY p3pDialogViewLevels.label "View Privacy Settings">
<!ENTITY p3pDialogMessage1.label "A website you have visited has set a cookie and triggered the cookie notification icon shown here, as required by your privacy settings.">
<!ENTITY p3pDialogMessage2.label "A cookie is a small bit of information stored on your computer by some websites. Use the Cookie Manager to manage your cookies and view their privacy status.">

View File

@@ -1,43 +0,0 @@
<!ENTITY lHeader "Cookies">
<!-- cookies -->
<!ENTITY cookiePolicy.label "Cookie Acceptance Policy">
<!ENTITY accAllCookiesRadio.label "Allow all cookies">
<!ENTITY accAllCookiesRadio.accesskey "c">
<!ENTITY accOrgCookiesRadio.label "Allow cookies for the originating website only">
<!ENTITY accOrgCookiesRadio.accesskey "o">
<!ENTITY accP3PCookiesRadio.label "Allow cookies based on privacy settings">
<!ENTITY accP3PCookiesRadio.accesskey "p">
<!ENTITY disableCookies.label "Block cookies">
<!ENTITY disableCookies.accesskey "B">
<!ENTITY cookieRetentionPolicy.label "Cookie Retention Policy">
<!ENTITY acceptNormally.label "Accept cookies normally">
<!ENTITY acceptNormally.accesskey "n">
<!ENTITY acceptForSession.label "Accept for current session only">
<!ENTITY acceptForSession.accesskey "s">
<!ENTITY acceptforNDays.label "Accept cookies for">
<!ENTITY acceptforNDays.accesskey "f">
<!ENTITY days.label "days">
<!ENTITY warnAboutCookies.label "Ask for each cookie">
<!ENTITY warnAboutCookies.accesskey "A">
<!ENTITY forCurrentSession.label "except for session cookies">
<!ENTITY forCurrentSession.accesskey "e">
<!ENTITY manageCookies.label "Manage Cookies and Sites">
<!ENTITY manageCookiesDescription.label "Allows you to view and manage stored cookies and per-site settings for accepting and rejecting cookies. Per-site settings will override the settings above.">
<!ENTITY viewCookies.label "Cookie Manager">
<!ENTITY viewCookies.accesskey "M">
<!ENTITY viewP3P.label "View Privacy Settings">
<!ENTITY viewP3P.accesskey "V">

View File

@@ -1,28 +0,0 @@
<!ENTITY lHeader "Images">
<!ENTITY imageBlocking.label "Image Acceptance Policy">
<!--LOCALIZATION NOTE (onStartLegend.label): Don't translate "&brandShortName;".
Place "&brandShortName;" in the phrase where the name of the application should
appear
-->
<!ENTITY imageDetails "Specify how &brandShortName; handles images.">
<!ENTITY accAllImagesRadio.label "Accept all images">
<!ENTITY accAllImagesRadio.accesskey "A">
<!ENTITY accOrgImagesRadio.label "Accept images that come from the originating server only">
<!ENTITY accOrgImagesRadio.accesskey "r">
<!ENTITY disableImages.label "Do not load any images">
<!ENTITY disableImages.accesskey "n">
<!ENTITY warnAboutImages.label "Ask me before downloading an image">
<!ENTITY warnAboutImages.accesskey "k">
<!ENTITY viewImagesExplanation.label "View list of sites about which image acceptance information is stored">
<!ENTITY viewImages.label "Manage Image Permissions">
<!ENTITY viewImages.accesskey "P">
<!ENTITY animLoopingTitle.label "Animated images should loop">
<!ENTITY animLoopAsSpecified.label "As many times as the image specifies">
<!ENTITY animLoopAsSpecified.accesskey "m">
<!ENTITY animLoopOnce.label "Once">
<!ENTITY animLoopOnce.accesskey "O">
<!ENTITY animLoopNever.label "Never">
<!ENTITY animLoopNever.accesskey "v">

View File

@@ -1,25 +0,0 @@
<!ENTITY title "Popup Windows">
<!ENTITY popupBlocking.label "Popup Windows">
<!ENTITY popupDesc.label "Specify how to handle popup windows that appear on top of or under the current Navigator window:">
<!ENTITY popupBlock.label "Block unrequested popup windows">
<!ENTITY popupBlock.accesskey "B">
<!ENTITY popupExceptions.label "Allowed Sites...">
<!ENTITY popupExceptions.accesskey "A">
<!ENTITY whenBlock.description "When a popup window has been blocked:">
<!ENTITY playSound.label "Play a sound:">
<!ENTITY selectSound.label "Select...">
<!ENTITY selectSound.accesskey "e">
<!ENTITY previewSound.label "Preview">
<!ENTITY previewSound.accesskey "r">
<!ENTITY selectSound.title "Select Popup Block Sound">
<!ENTITY displayIcon.label "Display an icon in the Navigator status bar">
<!ENTITY popupNote.description "Note: Blocking all popups may prevent important features of some websites from working, such as login windows for banks and shopping sites. For details of how to allow specific sites to use popups while blocking all others, click Help. Even if blocked, sites may use other methods to show popups.">

View File

@@ -1,210 +0,0 @@
<?xml version="1.0"?>
<!-- ***** BEGIN LICENSE BLOCK *****
Version: MPL 1.1/GPL 2.0/LGPL 2.1
The contents of this file are subject to the Mozilla Public License Version
1.1 (the "License"); you may not use this file except in compliance with
the License. You may obtain a copy of the License at
http://www.mozilla.org/MPL/
Software distributed under the License is distributed on an "AS IS" basis,
WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
for the specific language governing rights and limitations under the
License.
The Original Code is Mozilla Communicator client code, released
March 31, 1998.
The Initial Developer of the Original Code is
Netscape Communications Corporation.
Portions created by the Initial Developer are Copyright (C) 1998-1999
the Initial Developer. All Rights Reserved.
Contributor(s):
Ben Goodger
Alternatively, the contents of this file may be used under the terms of
either the GNU General Public License Version 2 or later (the "GPL"), or
the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
in which case the provisions of the GPL or the LGPL are applicable instead
of those above. If you wish to allow use of your version of this file only
under the terms of either the GPL or the LGPL, and not to allow others to
use your version of this file under the terms of the MPL, indicate your
decision by deleting the provisions above and replace them with the notice
and other provisions required by the GPL or the LGPL. If you do not delete
the provisions above, a recipient may use your version of this file under
the terms of any one of the MPL, the GPL or the LGPL.
***** END LICENSE BLOCK ***** -->
<!-- CHANGE THIS WHEN MOVING FILES -->
<?xml-stylesheet href="chrome://communicator/skin/" type="text/css"?>
<!-- CHANGE THIS WHEN MOVING FILES -->
<!DOCTYPE dialog SYSTEM "chrome://communicator/locale/wallet/CookieViewer.dtd" >
<dialog id="cookieviewer"
buttons="accept,help"
title="&windowtitle.label;"
xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
windowtype="mozilla:cookieviewer"
style="width: 30em;"
onload="Startup()"
onunload="Shutdown()"
ondialoghelp="doHelpButton();"
persist="screenX screenY width height">
<script src="chrome://communicator/content/wallet/CookieViewer.js"/>
<script src="chrome://global/content/strres.js"/>
<script src="chrome://communicator/content/wallet/nsWalletTreeUtils.js"/>
<script type="application/x-javascript" src="chrome://help/content/contextHelp.js" />
<keyset id="dialogKeys"/>
<stringbundle id="cookieBundle"
src="chrome://communicator/locale/wallet/CookieViewer.properties"/>
<tabbox id="tabbox" flex="1">
<tabs>
<tab id="cookiesTab" label="&tab.cookiesonsystem.label;"/>
<tab id="permissionsTab" label="&tab.bannedservers.label;"/>
</tabs>
<tabpanels id="panel" flex="1">
<vbox class="tabpanel" id="system" flex="1">
<vbox id="dummyContainer" flex="1">
<label value="&div.cookiesonsystem.label;"/>
<separator class="thin"/>
<tree id="cookiesTree" flex="1" style="height: 10em;"
onkeypress="HandleCookieKeyPress(event)"
onselect="CookieSelected();">
<treecols>
<treecol id="domainCol" label="&treehead.cookiedomain.label;" flex="5"
onclick="CookieColumnSort('rawHost', true);" persist="width hidden"/>
<splitter class="tree-splitter"/>
<treecol id="nameCol" label="&treehead.cookiename.label;" flex="5"
onclick="CookieColumnSort('name', true);" persist="width hidden"/>
<splitter class="tree-splitter"/>
<treecol id="expiresCol" label="&treehead.cookieexpires.label;" flex="10"
hidden="true" onclick="CookieColumnSort('expires', true);" persist="width hidden"/>
<splitter class="tree-splitter"/>
<treecol id="statusCol" label="&treehead.cookiestatus.label;" flex="1"
hidden="true" onclick="CookieColumnSort('status', true);" persist="width hidden"/>
</treecols>
<treechildren/>
</tree>
<groupbox>
<caption label="&treehead.infoselected.label;"/>
<!-- labels -->
<grid flex="1">
<columns>
<column/>
<column flex="1"/>
</columns>
<rows>
<row align="center">
<hbox align="center" pack="end">
<label value="&props.name.label;"/>
</hbox>
<textbox id="ifl_name" readonly="true" class="plain"/>
</row>
<row align="center">
<hbox align="center" pack="end">
<label value="&props.value.label;"/>
</hbox>
<textbox id="ifl_value" readonly="true" class="plain"/>
</row>
<row align="center">
<hbox align="center" pack="end">
<label id="ifl_isDomain" value="&props.domain.label;"/>
</hbox>
<textbox id="ifl_host" readonly="true" class="plain"/>
</row>
<row align="center">
<hbox align="center" pack="end">
<label value="&props.path.label;"/>
</hbox>
<textbox id="ifl_path" readonly="true" class="plain"/>
</row>
<row align="center">
<hbox align="center" pack="end">
<label value="&props.secure.label;"/>
</hbox>
<textbox id="ifl_isSecure" readonly="true" class="plain"/>
</row>
<row align="center">
<hbox align="center" pack="end">
<label value="&props.expires.label;"/>
</hbox>
<textbox id="ifl_expires" readonly="true" class="plain"/>
</row>
<row align="center" id="policyField" hidden="true">
<hbox align="center" pack="end">
<label value="&props.policy.label;"/>
</hbox>
<textbox id="ifl_policy" readonly="true" class="plain"/>
</row>
</rows>
</grid>
</groupbox>
<hbox>
<button id="removeCookie" disabled="true"
label="&button.removecookie.label;"
oncommand="DeleteCookie();"/>
<button id="removeAllCookies"
label="&button.removeallcookies.label;"
oncommand="DeleteAllCookies();"/>
<!-- todo: <button id="restoreCookies" class="dialog push" disabled="true" label="&button.restorecookie.label;" oncommand="RestoreCookies();"/> -->
</hbox>
<separator class="thin"/>
<hbox align="start">
<checkbox id="checkbox" label="&checkbox.label;" persist="checked"/>
</hbox>
</vbox>
</vbox>
<vbox id="servers" flex="1">
<description id="permissionsText" value="&div.bannedservers.label;"/>
<separator class="thin"/>
<hbox>
<textbox id="cookie-site" flex="1" oninput="buttonEnabling(this);"/>
<button id="btnBlock" label="&blockSite.label;" disabled="true"
oncommand="setCookiePermissions(nsIPermissionManager.DENY_ACTION);"/>
<button id="btnSession" label="&allowSiteSession.label;" disabled="true"
oncommand="setCookiePermissions(nsICookiePermission.ACCESS_SESSION);"/>
<button id="btnAllow" label="&allowSite.label;" disabled="true"
oncommand="setCookiePermissions(nsIPermissionManager.ALLOW_ACTION);"/>
</hbox>
<separator class="thin"/>
<tree id="permissionsTree" flex="1" style="height: 10em;"
hidecolumnpicker="true"
onkeypress="HandlePermissionKeyPress(event)"
onselect="PermissionSelected();">
<treecols>
<treecol id="siteCol" label="&treehead.sitename.label;" flex="5"
onclick="PermissionColumnSort('rawHost', true);" persist="width"/>
<splitter class="tree-splitter"/>
<treecol id="capabilityCol" label="&treehead.status.label;" flex="5"
onclick="PermissionColumnSort('capability', true);" persist="width"/>
</treecols>
<treechildren/>
</tree>
<hbox>
<button id="removePermission" disabled="true"
label="&removepermission.label;"
oncommand="DeletePermission();"/>
<button id="removeAllPermissions"
label="&removeallpermissions.label;"
oncommand="DeleteAllPermissions();"/>
</hbox>
</vbox>
</tabpanels>
</tabbox>
</dialog>

View File

@@ -1,178 +0,0 @@
/* -*- Mode: Java; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*-
*
* ***** BEGIN LICENSE BLOCK *****
* Version: MPL 1.1/GPL 2.0/LGPL 2.1
*
* The contents of this file are subject to the Mozilla Public License Version
* 1.1 (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
* http://www.mozilla.org/MPL/
*
* Software distributed under the License is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
* for the specific language governing rights and limitations under the
* License.
*
* The Original Code is mozilla.org code.
*
* The Initial Developer of the Original Code is
* Netscape Communications Corporation.
* Portions created by the Initial Developer are Copyright (C) 1998
* the Initial Developer. All Rights Reserved.
*
* Contributor(s):
*
* Alternatively, the contents of this file may be used under the terms of
* either the GNU General Public License Version 2 or later (the "GPL"), or
* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
* in which case the provisions of the GPL or the LGPL are applicable instead
* of those above. If you wish to allow use of your version of this file only
* under the terms of either the GPL or the LGPL, and not to allow others to
* use your version of this file under the terms of the MPL, indicate your
* decision by deleting the provisions above and replace them with the notice
* and other provisions required by the GPL or the LGPL. If you do not delete
* the provisions above, a recipient may use your version of this file under
* the terms of any one of the MPL, the GPL or the LGPL.
*
* ***** END LICENSE BLOCK ***** */
function DeleteAllFromTree
(tree, view, table, deletedTable, removeButton, removeAllButton) {
// remove all items from table and place in deleted table
for (var i=0; i<table.length; i++) {
deletedTable[deletedTable.length] = table[i];
}
table.length = 0;
// redisplay
var oldCount = view.rowCount;
view.rowCount = 0;
tree.treeBoxObject.rowCountChanged(0, -oldCount);
// disable buttons
document.getElementById(removeButton).setAttribute("disabled", "true")
document.getElementById(removeAllButton).setAttribute("disabled","true");
}
function DeleteSelectedItemFromTree
(tree, view, table, deletedTable, removeButton, removeAllButton) {
// Turn off tree selection notifications during the deletion
tree.view.selection.selectEventsSuppressed = true;
// remove selected items from list (by setting them to null) and place in deleted list
var selections = GetTreeSelections(tree);
for (var s=selections.length-1; s>= 0; s--) {
var i = selections[s];
deletedTable[deletedTable.length] = table[i];
table[i] = null;
}
// collapse list by removing all the null entries
for (var j=0; j<table.length; j++) {
if (table[j] == null) {
var k = j;
while ((k < table.length) && (table[k] == null)) {
k++;
}
table.splice(j, k-j);
view.rowCount -= k - j;
tree.treeBoxObject.rowCountChanged(j, j - k);
}
}
// update selection and/or buttons
if (table.length) {
// update selection
var nextSelection = (selections[0] < table.length) ? selections[0] : table.length-1;
tree.view.selection.select(nextSelection);
tree.treeBoxObject.ensureRowIsVisible(nextSelection);
} else {
// disable buttons
document.getElementById(removeButton).setAttribute("disabled", "true")
document.getElementById(removeAllButton).setAttribute("disabled","true");
}
tree.view.selection.selectEventsSuppressed = false;
}
function GetTreeSelections(tree) {
var selections = [];
var select = tree.view.selection;
if (select) {
var count = select.getRangeCount();
var min = new Object();
var max = new Object();
for (var i=0; i<count; i++) {
select.getRangeAt(i, min, max);
for (var k=min.value; k<=max.value; k++) {
if (k != -1) {
selections[selections.length] = k;
}
}
}
}
return selections;
}
function SortTree(tree, view, table, column, lastSortColumn, lastSortAscending, updateSelection) {
// remember which item was selected so we can restore it after the sort
var selections = GetTreeSelections(tree);
var selectedNumber = selections.length ? table[selections[0]].number : -1;
// determine if sort is to be ascending or descending
var ascending = (column == lastSortColumn) ? !lastSortAscending : true;
// do the sort or re-sort
// this is a temporary hack for 1.7, we should implement
// display and sort variables here for trees in general
var compareFunc;
if (column == "expires") {
compareFunc = function compare(first, second) {
if (first.expiresSortValue > second.expiresSortValue)
return 1;
else if (first.expiresSortValue < second.expiresSortValue)
return -1;
else
return 0;
}
} else {
compareFunc = function compare(first, second) {
return first[column].toLowerCase().localeCompare(second[column].toLowerCase());
}
}
table.sort(compareFunc);
if (!ascending)
table.reverse();
// restore the selection
var selectedRow = -1;
if (selectedNumber>=0 && updateSelection) {
for (var s=0; s<table.length; s++) {
if (table[s].number == selectedNumber) {
// update selection
// note: we need to deselect before reselecting in order to trigger ...Selected()
tree.view.selection.select(-1);
tree.view.selection.select(s);
selectedRow = s;
break;
}
}
}
// display the results
tree.treeBoxObject.invalidate();
if (selectedRow >= 0) {
tree.treeBoxObject.ensureRowIsVisible(selectedRow)
}
return ascending;
}

View File

@@ -1,38 +0,0 @@
<!ENTITY tab.cookiesonsystem.label "Stored Cookies">
<!ENTITY tab.bannedservers.label "Cookie Sites">
<!ENTITY div.bannedservers.label "Manage sites that can and cannot store cookies on your computer.">
<!ENTITY div.cookiesonsystem.label "View and remove cookies that are stored on your computer.">
<!ENTITY treehead.cookiename.label "Cookie Name">
<!ENTITY treehead.cookiedomain.label "Site">
<!ENTITY treehead.cookiestatus.label "Status">
<!ENTITY treehead.cookieexpires.label "Expires">
<!ENTITY treehead.infoselected.label "Information about the selected Cookie">
<!ENTITY button.removecookie.label "Remove Cookie">
<!ENTITY button.removeallcookies.label "Remove All Cookies">
<!ENTITY props.name.label "Name:">
<!ENTITY props.value.label "Content:">
<!ENTITY props.domain.label "Host:">
<!ENTITY props.path.label "Path:">
<!ENTITY props.secure.label "Send For:">
<!ENTITY props.expires.label "Expires:">
<!ENTITY props.policy.label "Policy:">
<!ENTITY treehead.sitename.label "Site">
<!ENTITY treehead.status.label "Status">
<!ENTITY windowtitle.label "Cookie Manager">
<!ENTITY blockSite.label "Block">
<!ENTITY allowSite.label "Allow">
<!ENTITY allowSiteSession.label "Session">
<!ENTITY removepermission.label "Remove Site">
<!ENTITY removeallpermissions.label "Remove All Sites">
<!ENTITY removeimage.label "Remove Site">
<!ENTITY removeallimages.label "Remove All Sites">
<!ENTITY canSet.label "can set cookies">
<!ENTITY cannotSet.label "cannot set cookies">
<!ENTITY canLoad.label "can load images">
<!ENTITY cannotLoad.label "cannot load images">
<!ENTITY checkbox.label "Don't allow sites that set removed cookies to set future cookies">

View File

@@ -1,73 +0,0 @@
# ***** BEGIN LICENSE BLOCK *****
# Version: MPL 1.1/GPL 2.0/LGPL 2.1
#
# The contents of this file are subject to the Mozilla Public License Version
# 1.1 (the "License"); you may not use this file except in compliance with
# the License. You may obtain a copy of the License at
# http://www.mozilla.org/MPL/
#
# Software distributed under the License is distributed on an "AS IS" basis,
# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
# for the specific language governing rights and limitations under the
# License.
#
# The Original Code is mozilla.org code.
#
# The Initial Developer of the Original Code is
# Netscape Communications Corporation.
# Portions created by the Initial Developer are Copyright (C) 1998
# the Initial Developer. All Rights Reserved.
#
# Contributor(s):
# Ben Goodger
#
# Alternatively, the contents of this file may be used under the terms of
# either the GNU General Public License Version 2 or later (the "GPL"), or
# the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
# in which case the provisions of the GPL or the LGPL are applicable instead
# of those above. If you wish to allow use of your version of this file only
# under the terms of either the GPL or the LGPL, and not to allow others to
# use your version of this file under the terms of the MPL, indicate your
# decision by deleting the provisions above and replace them with the notice
# and other provisions required by the GPL or the LGPL. If you do not delete
# the provisions above, a recipient may use your version of this file under
# the terms of any one of the MPL, the GPL or the LGPL.
#
# ***** END LICENSE BLOCK *****
# note this section of the code may require some tinkering in other languages =(
# format in dialog: site [can/cannot] set cookies
can=site can set cookies
cannot=site cannot set cookies
canSession=site can set session cookies
canImages=site can load images
cannotImages=site cannot load images
canPopups=site can show popups
cannotPopups=site cannot show popups
domain=Domain for which this cookie applies:
host=Server which set the cookie:
imageTitle=Image Manager
popupTitle=Pop-up Manager
hostColon=Host:
domainColon=Domain:
forSecureOnly=Encrypted connections only
forAnyConnection=Any type of connection
AtEndOfSession = at end of session
tabBannedImages=Image Sites
tabBannedPopups=Pop-up Sites
textBannedImages=Sites from which images are or are not loaded.
textBannedPopups=Sites from which pop-up windows are or are not allowed.
accepted=accepted
downgraded=session
flagged=flagged
policyUnstated = no policy about storing identifiable information
policyNoConsent = stores identifiable information without any user consent
policyImplicitConsent = stores identifiable information unless user opts out
policyExplicitConsent = stores identifiable information if user opts in
policyNoIICollected = does not store identifiable information
close=Close
deleteAllCookies=Are you sure you want to delete all the cookies?
deleteAllCookiesTitle=Remove All Cookies
deleteAllCookiesSites=Are you sure you want to delete all of the cookie sites?
deleteAllImagesSites=Are you sure you want to delete all of the image sites?
deleteAllSitesTitle=Remove All Sites

View File

@@ -1,403 +0,0 @@
/* ***** BEGIN LICENSE BLOCK *****
* Version: MPL 1.1/GPL 2.0/LGPL 2.1
*
* The contents of this file are subject to the Mozilla Public License Version
* 1.1 (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
* http://www.mozilla.org/MPL/
*
* Software distributed under the License is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
* for the specific language governing rights and limitations under the
* License.
*
* The Original Code is Mozilla Communicator client code.
*
* The Initial Developer of the Original Code is
* Netscape Communications Corporation.
* Portions created by the Initial Developer are Copyright (C) 2002
* the Initial Developer. All Rights Reserved.
*
* Contributor(s):
*
* Alternatively, the contents of this file may be used under the terms of
* either of the GNU General Public License Version 2 or later (the "GPL"),
* or the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
* in which case the provisions of the GPL or the LGPL are applicable instead
* of those above. If you wish to allow use of your version of this file only
* under the terms of either the GPL or the LGPL, and not to allow others to
* use your version of this file under the terms of the MPL, indicate your
* decision by deleting the provisions above and replace them with the notice
* and other provisions required by the GPL or the LGPL. If you do not delete
* the provisions above, a recipient may use your version of this file under
* the terms of any one of the MPL, the GPL or the LGPL.
*
* ***** END LICENSE BLOCK ***** */
const nsIPermissionManager = Components.interfaces.nsIPermissionManager;
const popupType = "popup";
var permissionManager = null;
var permissions = [];
var additions = [];
var removals = [];
var sortColumn = "host";
var sortAscending = false;
var permissionsTreeView = {
rowCount: 0,
setTree: function(tree) {},
getImageSrc: function(row, column) {},
getProgressMode: function(row, column) {},
getCellValue: function(row, column) {},
getCellText: function(row, column) {
var rv = permissions[row].host;
return rv;
},
isSeparator: function(index) { return false; },
isSorted: function() { return false; },
isContainer: function(index) { return false; },
cycleHeader: function(column) {},
getRowProperties: function(row, column, prop) {},
getColumnProperties: function(column, prop) {},
getCellProperties: function(row, column, prop) {}
};
var permissionsTree;
var popupStringBundle;
function Startup() {
permissionManager = Components.classes["@mozilla.org/permissionmanager;1"]
.getService(Components.interfaces.nsIPermissionManager);
permissionsTree = document.getElementById("permissionsTree");
popupStringBundle = document.getElementById("popupStringBundle");
sortAscending = (permissionsTree.getAttribute("sortAscending") == "true");
loadPermissions(permissions);
loadTree();
// window.arguments[0] contains the host to prefill
if (window.arguments[0] != "") {
// fill textbox to unblock/add to whitelist
var prefill = window.arguments[0];
if (prefill.indexOf("www.") == 0)
prefill = prefill.slice(4);
document.getElementById("addSiteBox").value = prefill;
}
document.documentElement.addEventListener("keypress", onReturnHit, true);
}
function getMatch(host) {
// pre-pend '.' so we always match on host boundaries. Otherwise
// we might think notfoo.com matches foo.com
var currentLoc = '.'+host;
var nextHost;
var inList;
var matchIndex = null;
var matchLength = 0;
for (var i = 0; i < permissionsTreeView.rowCount; i++) {
nextHost = '.'+permissions[i].host;
if (currentLoc.length < nextHost.length)
continue; // can't be a match, list host is more specific
// look for an early out exact match -- check length first for speed
if (currentLoc.length == nextHost.length && nextHost == currentLoc) {
inList = true;
matchIndex = i;
break;
}
if (nextHost == currentLoc.substr(currentLoc.length - nextHost.length)) {
inList = true;
if (nextHost.length > matchLength) {
matchIndex = i;
matchLength = nextHost.length;
}
}
}
return matchIndex;
}
function onAccept() {
finalizeChanges();
var unblocked = additions;
permissionsTree.setAttribute("sortAscending", !sortAscending);
var nextLocation;
var nextUnblocked;
var windowMediator = Components.classes['@mozilla.org/appshell/window-mediator;1']
.getService(Components.interfaces.nsIWindowMediator);
var enumerator = windowMediator.getEnumerator("navigator:browser");
//if a site that is currently open is unblocked, make icon go away
while(enumerator.hasMoreElements()) {
var win = enumerator.getNext();
var browsers = win.getBrowser().browsers;
for (var i = 0; i < browsers.length; i++) {
try {
nextLocation = browsers[i].currentURI.hostPort;
}
catch(ex) {
//blank window
}
if (nextLocation) {
nextLocation = '.'+nextLocation;
for (var j in unblocked) {
nextUnblocked = '.'+unblocked[j];
if (nextUnblocked.length > nextLocation.length)
continue; // can't be a match
if (nextUnblocked ==
nextLocation.substr(nextLocation.length - nextUnblocked.length)) {
browsers[i].popupDomain = null;
win.document.getElementById("popupIcon").hidden = true;
}
}
}
}
}
return true;
}
function Permission(host, number) {
this.host = host;
this.number = number;
}
function loadPermissions(table) {
var enumerator = permissionManager.enumerator;
var count = 0;
while (enumerator.hasMoreElements()) {
var permission = enumerator.getNext();
if (permission) {
permission = permission.QueryInterface(Components.interfaces.nsIPermission);
if ((permission.type == popupType) && (permission.capability == nsIPermissionManager.ALLOW_ACTION)) {
var host = permission.host;
table[count] = new Permission(host,count++);
}
}
}
}
function loadTree() {
var rowCount = permissions.length;
permissionsTreeView.rowCount = rowCount;
permissionsTree.treeBoxObject.view = permissionsTreeView;
permissionColumnSort();
if (permissions.length == 0)
document.getElementById("removeAllPermissions").setAttribute("disabled","true");
else
document.getElementById("removeAllPermissions").removeAttribute("disabled");
}
function permissionColumnSort() {
sortAscending =
SortTree(permissionsTree, permissionsTreeView, permissions,
sortColumn, sortColumn, sortAscending);
}
function permissionSelected() {
var selections = GetTreeSelections(permissionsTree);
if (selections.length) {
document.getElementById("removePermission").removeAttribute("disabled");
}
}
function deletePermissions() {
var selections = GetTreeSelections(permissionsTree);
for (var s = selections.length - 1; s >= 0; s--) {
var i = selections[s];
var host = permissions[i].host;
updatePendingRemovals(host);
permissions[i] = null;
}
for (var j = 0; j < permissions.length; j++) {
if (permissions[j] == null) {
var k = j;
while ((k < permissions.length) && (permissions[k] == null)) {
k++;
}
permissions.splice(j, k-j);
permissionsTreeView.rowCount -= k - j;
permissionsTree.treeBoxObject.rowCountChanged(j, j - k);
}
}
if (permissions.length) {
var nextSelection = (selections[0] < permissions.length) ? selections[0] : permissions.length - 1;
permissionsTreeView.selection.select(nextSelection);
permissionsTree.treeBoxObject.ensureRowIsVisible(nextSelection);
}
else {
document.getElementById("removePermission").setAttribute("disabled", "true")
document.getElementById("removeAllPermissions").setAttribute("disabled","true");
}
}
function deleteAllPermissions() {
for (var i = 0; i < permissions.length; i++) {
var host = permissions[i].host;
updatePendingRemovals(host);
}
permissions.length = 0;
clearTree();
}
function updatePendingRemovals(host) {
if (additions[host])
additions[host] = null;
else
removals[host] = host;
}
function clearTree() {
var oldCount = permissionsTreeView.rowCount;
permissionsTreeView.rowCount = 0;
permissionsTree.treeBoxObject.rowCountChanged(0, -oldCount);
document.getElementById("removePermission").setAttribute("disabled", "true")
document.getElementById("removeAllPermissions").setAttribute("disabled","true");
}
function finalizeChanges() {
var ioService = Components.classes["@mozilla.org/network/io-service;1"]
.getService(Components.interfaces.nsIIOService);
var uri;
var host;
var i;
//note: the scheme will be taken off later, it is being added now only to
//create the uri for add/remove
for (i in additions) {
host = additions[i];
if (host != null) {
host = "http://" + host;
uri = ioService.newURI(host, null, null);
permissionManager.add(uri, popupType, true);
}
}
for (i in removals) {
host = removals[i];
if (host != null) {
permissionManager.remove(host, popupType);
}
}
}
function handlePermissionKeyPress(e) {
if (e.keyCode == 46) {
deletePermissions();
}
}
function addPermission() {
var addSiteBox = document.getElementById("addSiteBox");
var host = addSiteBox.value;
if (host != "") {
host = host.replace(/^\s*([-\w]*:\/+)?/, ""); // trim any leading space and scheme
var promptService = Components.classes["@mozilla.org/embedcomp/prompt-service;1"]
.getService(Components.interfaces.nsIPromptService);
var ioService = Components.classes["@mozilla.org/network/io-service;1"]
.getService(Components.interfaces.nsIIOService);
try {
var uri = ioService.newURI("http://"+host, null, null);
}
catch(ex) {
var msgInvalid = popupStringBundle.getFormattedString("alertInvalid", [host]);
if (promptService)
promptService.alert(window, "", msgInvalid);
addSiteBox.value = "";
return;
}
host = uri.hostPort;
if (!host) {
addSiteBox.value = "";
return;
}
var length = permissions.length;
var isDuplicate = false;
for (var i = 0; i < length; i++) {
if (permissions[i].host == host) {
var msgDuplicate = popupStringBundle.getFormattedString("alertDuplicate", [host]);
if (promptService)
promptService.alert(window, "", msgDuplicate);
isDuplicate = true;
break;
}
}
if (!isDuplicate) {
var newPermission = new Permission(host, length);
permissions.push(newPermission);
sortAscending = !sortAscending; //keep same sort direction
loadTree();
if (removals[host] != null)
removals[host] = null;
else
additions[host] = host;
}
addSiteBox.value = "";
}
}
function onReturnHit(event) {
var focusedElement = document.commandDispatcher.focusedElement;
var addSiteBox = document.getElementById("addSiteBox");
if (event.keyCode == 13) {
if (focusedElement) {
if (focusedElement.id == "permissionsTree")
return;
else {
event.preventBubble();
if (focusedElement == addSiteBox.inputField) {
var addSiteButton = document.getElementById("addSiteButton");
addSiteButton.doCommand();
}
}
}
}
}
function doHelpButton() {
openHelp("pop_up_blocking");
return true;
}

View File

@@ -1,100 +0,0 @@
<?xml version="1.0"?>
<!-- ***** BEGIN LICENSE BLOCK *****
- Version: MPL 1.1/GPL 2.0/LGPL 2.1
-
- The contents of this file are subject to the Mozilla Public License Version
- 1.1 (the "License"); you may not use this file except in compliance with
- the License. You may obtain a copy of the License at
- http://www.mozilla.org/MPL/
-
- Software distributed under the License is distributed on an "AS IS" basis,
- WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- for the specific language governing rights and limitations under the
- License.
-
- The Original Code is mozilla.org code.
-
- The Initial Developer of the Original Code is
- Netscape Communications Corporation.
- Portions created by the Initial Developer are Copyright (C) 2002
- the Initial Developer. All Rights Reserved.
-
- Alternatively, the contents of this file may be used under the terms of
- either the GNU General Public License Version 2 or later (the "GPL"), or
- the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- in which case the provisions of the GPL or the LGPL are applicable instead
- of those above. If you wish to allow use of your version of this file only
- under the terms of either the GPL or the LGPL, and not to allow others to
- use your version of this file under the terms of the MPL, indicate your
- decision by deleting the provisions above and replace them with the notice
- and other provisions required by the LGPL or the GPL. If you do not delete
- the provisions above, a recipient may use your version of this file under
- the terms of any one of the MPL, the GPL or the LGPL.
-
- ***** END LICENSE BLOCK ***** -->
<?xml-stylesheet href="chrome://communicator/skin/" type="text/css"?>
<!DOCTYPE dialog SYSTEM "chrome://communicator/locale/popupManager.dtd" >
<dialog id="popupManager"
buttons="accept,cancel,help"
title="&windowtitle.label;"
xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
style="width:32em; height:42em;"
persist="width height screenX screenY"
onload="Startup();"
ondialogaccept="return onAccept();"
ondialoghelp="return doHelpButton();">
<script type="application/x-javascript" src="chrome://communicator/content/popupManager.js"/>
<script type="application/x-javascript" src="chrome://global/content/strres.js"/>
<script type="application/x-javascript" src="chrome://communicator/content/wallet/nsWalletTreeUtils.js"/>
<script type="application/x-javascript" src="chrome://help/content/contextHelp.js"/>
<keyset id="dialogKeys"/>
<stringbundle id="popupStringBundle"
src="chrome://communicator/locale/popupManager.properties"/>
<vbox id="servers" flex="1">
<description id="allowPopups" value="&allowPopups.label;"/>
<separator class="thin"/>
<hbox align="center">
<vbox flex="1">
<textbox id="addSiteBox" flex="1"/>
</vbox>
<button id="addSiteButton"
label="&addSite.label;" accesskey="&addSite.accesskey;"
oncommand="addPermission();"/>
</hbox>
<separator class="thin"/>
<tree id="permissionsTree" flex="1"
hidecolumnpicker="true"
onkeypress="handlePermissionKeyPress(event)"
onselect="permissionSelected();"
sortAscending="false"
persist="sortAscending">
<treecols>
<treecol id="siteCol" label="&treehead.sitename.label;" flex="1"
onclick="permissionColumnSort();"/>
</treecols>
<treechildren/>
</tree>
<hbox>
<button id="removePermission" disabled="true"
label="&remove.label;" accesskey="&remove.accesskey;"
oncommand="deletePermissions();"/>
<button id="removeAllPermissions"
label="&removeAll.label;" accesskey="&removeAll.accesskey;"
oncommand="deleteAllPermissions();"/>
</hbox>
</vbox>
</dialog>

View File

@@ -1,9 +0,0 @@
<!ENTITY windowtitle.label "About Popups">
<!ENTITY popupDesc.label "This web site has opened an unrequested popup window. &brandShortName; can prevent popups from opening without your approval. When a popup is blocked, &brandShortName; can be set up to display an icon in the status bar.">
<!ENTITY popupDescAlt.label "&brandShortName; can prevent popups from opening without your approval. When a popup is blocked, &brandShortName; can be set up to display an icon in the status bar.">
<!ENTITY popupNote1.label "To set preferences for controlling popups, open the Edit menu and choose Preferences. Under the Privacy &amp; Security category, click Popup Windows.">
<!ENTITY popupNote2.label "Would you like to block popups and set preferences now?">
<!ENTITY acceptButton.label "Yes">
<!ENTITY cancelButton.label "No">

View File

@@ -1,14 +0,0 @@
<!ENTITY windowtitle.label "Allowed Web Sites">
<!ENTITY allowPopups.label "Allow popups from the following web sites:">
<!ENTITY addSite.label "Add">
<!ENTITY addSite.accesskey "A">
<!ENTITY treehead.sitename.label "Site">
<!ENTITY remove.label "Remove">
<!ENTITY remove.accesskey "R">
<!ENTITY removeAll.label "Remove All">
<!ENTITY removeAll.accesskey "e">

View File

@@ -1,2 +0,0 @@
alertDuplicate=The web site %S already exists in this list.
alertInvalid=The web site %S is invalid.