CCK - NPOB - Add support for cookie allow and xpi/popup/cookie deny
git-svn-id: svn://10.0.0.236/trunk@256077 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
@@ -97,6 +97,12 @@
|
||||
<!ENTITY allowedSites.caption "Allowed Sites">
|
||||
<!ENTITY popupAllowedSites.label "You can specify domains for which popups are allowed. List the domains, separated by a comma.">
|
||||
<!ENTITY installAllowedSites.label "You can specify domains for which software installations (XPIs) are allowed. List the domains, separated by a comma.">
|
||||
<!ENTITY cookieAllowedSites.label "You can specify domains for which cookies are always allowed. List the domains, separated by a comma.">
|
||||
|
||||
<!ENTITY deniedSites.caption "Denied Sites">
|
||||
<!ENTITY popupDeniedSites.label "You can specify domains for which popups are denied. List the domains, separated by a comma.">
|
||||
<!ENTITY installDeniedSites.label "You can specify domains for which software installations (XPIs) are denied. List the domains, separated by a comma.">
|
||||
<!ENTITY cookieDeniedSites.label "You can specify domains for which cookies are always denied. List the domains, separated by a comma.">
|
||||
|
||||
<!ENTITY customizeBrowserPlugins.label "Customize Browser Plug-ins">
|
||||
<!ENTITY browserPlugins.description "Use the buttons below to add browser plug-ins.">
|
||||
|
||||
@@ -1578,6 +1578,10 @@ function CCKWriteProperties(destdir)
|
||||
|
||||
str = str.replace(/%PopupAllowedSites%/g, document.getElementById("PopupAllowedSites").value);
|
||||
str = str.replace(/%InstallAllowedSites%/g, document.getElementById("InstallAllowedSites").value);
|
||||
str = str.replace(/%CookieAllowedSites%/g, document.getElementById("CookieAllowedSites").value);
|
||||
str = str.replace(/%PopupDeniedSites%/g, document.getElementById("PopupDeniedSites").value);
|
||||
str = str.replace(/%InstallDeniedSites%/g, document.getElementById("InstallDeniedSites").value);
|
||||
str = str.replace(/%CookieDeniedSites%/g, document.getElementById("CookieDeniedSites").value);
|
||||
cos.writeString(str);
|
||||
|
||||
if (document.getElementById("hidden").checked)
|
||||
|
||||
@@ -320,14 +320,33 @@
|
||||
<wizardpage label="&customizePartFour.label;">
|
||||
<groupbox>
|
||||
<caption label="&allowedSites.caption;"/>
|
||||
<description control="PopupAllowedSites">&popupAllowedSites.label;</description>
|
||||
<vbox>
|
||||
<description control="PopupAllowedSites">&popupAllowedSites.label;</description>
|
||||
<vbox>
|
||||
<textbox id="PopupAllowedSites" flex="1"/>
|
||||
</vbox>
|
||||
<description control="InstallAllowedSites">&installAllowedSites.label;</description>
|
||||
<vbox>
|
||||
</vbox>
|
||||
<description control="InstallAllowedSites">&installAllowedSites.label;</description>
|
||||
<vbox>
|
||||
<textbox id="InstallAllowedSites" flex="1"/>
|
||||
</vbox>
|
||||
</vbox>
|
||||
<description control="CookieAllowedSites">&cookieAllowedSites.label;</description>
|
||||
<vbox>
|
||||
<textbox id="CookieAllowedSites" flex="1"/>
|
||||
</vbox>
|
||||
</groupbox>
|
||||
<groupbox>
|
||||
<caption label="&deniedSites.caption;"/>
|
||||
<description control="PopupDeniedSites">&popupDeniedSites.label;</description>
|
||||
<vbox>
|
||||
<textbox id="PopupDeniedSites" flex="1"/>
|
||||
</vbox>
|
||||
<description control="InstallDeniedSites">&installDeniedSites.label;</description>
|
||||
<vbox>
|
||||
<textbox id="InstallDeniedSites" flex="1"/>
|
||||
</vbox>
|
||||
<description control="CookieDeniedSites">&cookieDeniedSites.label;</description>
|
||||
<vbox>
|
||||
<textbox id="CookieDeniedSites" flex="1"/>
|
||||
</vbox>
|
||||
</groupbox>
|
||||
</wizardpage>
|
||||
|
||||
|
||||
@@ -9,3 +9,7 @@ browser.search.defaultenginename=%browser.search.defaultenginename%
|
||||
browser.search.order.1=%browser.search.order.1%
|
||||
PopupAllowedSites=%PopupAllowedSites%
|
||||
InstallAllowedSites=%InstallAllowedSites%
|
||||
CookieAllowedSites=%CookieAllowedSites%
|
||||
PopupDeniedSites=%PopupDeniedSites%
|
||||
InstallDeniedSites=%InstallDeniedSites%
|
||||
CookieDeniedSites=%CookieDeniedSites%
|
||||
|
||||
@@ -237,7 +237,7 @@ CCKService.prototype={
|
||||
try {
|
||||
installAllowedSites = bundle.GetStringFromName("InstallAllowedSites");
|
||||
} catch (ex) {}
|
||||
if (popupAllowedSites) {
|
||||
if (installAllowedSites) {
|
||||
var installAllowedSitesArray = installAllowedSites.split(",");
|
||||
for (var i=0; i < installAllowedSitesArray.length; i++) {
|
||||
try {
|
||||
@@ -247,6 +247,62 @@ CCKService.prototype={
|
||||
}
|
||||
}
|
||||
|
||||
var cookieAllowedSites;
|
||||
try {
|
||||
cookieAllowedSites = bundle.GetStringFromName("CookieAllowedSites");
|
||||
} catch (ex) {}
|
||||
if (cookieAllowedSites) {
|
||||
var cookieAllowedSitesArray = cookieAllowedSites.split(",");
|
||||
for (var i=0; i < cookieAllowedSitesArray.length; i++) {
|
||||
try {
|
||||
var uri = ioService.newURI("http://" + cookieAllowedSitesArray[i], null, null);
|
||||
pm.add(uri, "cookie", 1);
|
||||
} catch (ex) {}
|
||||
}
|
||||
}
|
||||
|
||||
var popupDeniedSites;
|
||||
try {
|
||||
popupDeniedSites = bundle.GetStringFromName("PopupDeniedSites");
|
||||
} catch (ex) {}
|
||||
if (popupDeniedSites) {
|
||||
var popupDeniedSitesArray = popupDeniedSites.split(",");
|
||||
for (var i=0; i < popupDeniedSitesArray.length; i++) {
|
||||
try {
|
||||
var uri = ioService.newURI("http://" + popupDeniedSitesArray[i], null, null);
|
||||
pm.add(uri, "popup", 2);
|
||||
} catch (ex) {}
|
||||
}
|
||||
}
|
||||
|
||||
var installDeniedSites;
|
||||
try {
|
||||
installDeniedSites = bundle.GetStringFromName("InstallDeniedSites");
|
||||
} catch (ex) {}
|
||||
if (installDeniedSites) {
|
||||
var installDeniedSitesArray = installDeniedSites.split(",");
|
||||
for (var i=0; i < installDeniedSitesArray.length; i++) {
|
||||
try {
|
||||
var uri = ioService.newURI("http://" + installDeniedSitesArray[i], null, null);
|
||||
pm.add(uri, "install", 2);
|
||||
} catch (ex) {}
|
||||
}
|
||||
}
|
||||
|
||||
var cookieDeniedSites;
|
||||
try {
|
||||
cookieDeniedSites = bundle.GetStringFromName("CookieDeniedSites");
|
||||
} catch (ex) {}
|
||||
if (cookieDeniedSites) {
|
||||
var cookieDeniedSitesArray = cookieDeniedSites.split(",");
|
||||
for (var i=0; i < cookieDeniedSitesArray.length; i++) {
|
||||
try {
|
||||
var uri = ioService.newURI("http://" + cookieDeniedSitesArray[i], null, null);
|
||||
pm.add(uri, "cookie", 2);
|
||||
} catch (ex) {}
|
||||
}
|
||||
}
|
||||
|
||||
var i = 1;
|
||||
var prefName;
|
||||
do {
|
||||
|
||||
Reference in New Issue
Block a user