зеркало из https://github.com/mozilla/pjs.git
407082 - remove redundant code and UI for first popup information. Also remove the 'About Popup Blocking' menuitem and related code. r+sr=Neil.
This commit is contained in:
Родитель
0c2a5f886c
Коммит
1ed79e775f
|
@ -357,7 +357,6 @@ pref("alerts.totalOpenTime", 4000);
|
|||
// 2 and other values, no download manager, no progress dialog.
|
||||
pref("browser.downloadmanager.behavior", 0);
|
||||
|
||||
pref("privacy.popups.first_popup", true);
|
||||
pref("privacy.popups.sound_enabled", false);
|
||||
pref("privacy.popups.sound_url", "");
|
||||
pref("privacy.popups.statusbar_icon_enabled", true);
|
||||
|
|
|
@ -667,7 +667,6 @@ function Startup()
|
|||
// initiated by a web page script
|
||||
addEventListener("fullscreen", onFullScreen, true);
|
||||
|
||||
addEventListener("PopupWindow", onPopupWindow, true);
|
||||
addEventListener("PopupCountChanged", UpdateStatusBarPopupIcon, true);
|
||||
|
||||
addEventListener("AppCommand", HandleAppCommandEvent, true);
|
||||
|
@ -2216,55 +2215,6 @@ function onFullScreen()
|
|||
FullScreen.toggle();
|
||||
}
|
||||
|
||||
function onPopupWindow(aEvent)
|
||||
{
|
||||
var firstPopup = pref.getBoolPref("privacy.popups.first_popup");
|
||||
var blockingEnabled = pref.getBoolPref("dom.disable_open_during_load");
|
||||
if (blockingEnabled) {
|
||||
pref.setBoolPref("privacy.popups.first_popup", false);
|
||||
return;
|
||||
}
|
||||
if (firstPopup) {
|
||||
var showDialog = true;
|
||||
var specialList = "";
|
||||
try {
|
||||
specialList = pref.getComplexValue("privacy.popups.default_whitelist",
|
||||
Components.interfaces.nsIPrefLocalizedString).data;
|
||||
}
|
||||
catch(ex) { }
|
||||
if (specialList) {
|
||||
hosts = specialList.split(",");
|
||||
var browser = getBrowserForDocument(aEvent.target);
|
||||
if (!browser)
|
||||
return;
|
||||
var currentHost = browser.currentURI.hostPort;
|
||||
for (var i = 0; i < hosts.length; i++) {
|
||||
var nextHost = hosts[i];
|
||||
if (nextHost == currentHost ||
|
||||
"."+nextHost == currentHost.substr(currentHost.length - (nextHost.length+1))) {
|
||||
showDialog = false;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
if (showDialog) {
|
||||
window.openDialog("chrome://communicator/content/permissions/aboutPopups.xul", "",
|
||||
"chrome,centerscreen,dependent", true);
|
||||
pref.setBoolPref("privacy.popups.first_popup", false);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function getBrowserForDocument(doc)
|
||||
{
|
||||
var browsers = getBrowser().browsers;
|
||||
for (var i = 0; i < browsers.length; i++) {
|
||||
if (browsers[i].contentDocument == doc)
|
||||
return browsers[i];
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
function UpdateStatusBarPopupIcon(aEvent)
|
||||
{
|
||||
if (aEvent && aEvent.originalTarget != gBrowser.getNotificationBox())
|
||||
|
|
|
@ -123,7 +123,6 @@ comm.jar:
|
|||
content/communicator/history/history-test.xul (history/history-test.xul)
|
||||
content/communicator/history/findHistory.js (history/findHistory.js)
|
||||
content/communicator/history/findHistory.xul (history/findHistory.xul)
|
||||
content/communicator/permissions/aboutPopups.xul (permissions/aboutPopups.xul)
|
||||
content/communicator/permissions/cookieViewer.js (permissions/cookieViewer.js)
|
||||
content/communicator/permissions/cookieViewer.xul (permissions/cookieViewer.xul)
|
||||
content/communicator/permissions/imageContextOverlay.xul (permissions/imageContextOverlay.xul)
|
||||
|
|
|
@ -91,7 +91,6 @@
|
|||
|
||||
blocked = permissionmanager.testPermission(getBrowser().currentURI, "popup");
|
||||
|
||||
document.getElementById("AboutPopups").hidden = policy;
|
||||
document.getElementById("ManagePopups").hidden = !policy;
|
||||
|
||||
if (policy) {
|
||||
|
@ -176,12 +175,6 @@
|
|||
promptService.alert(window,element.getAttribute("title"), element.getAttribute("msg"));
|
||||
}
|
||||
|
||||
function OpenAboutPopups() {
|
||||
window.openDialog("chrome://communicator/content/permissions/aboutPopups.xul", "",
|
||||
"chrome,centerscreen,dependent",
|
||||
false);
|
||||
}
|
||||
|
||||
function popupHost() {
|
||||
var hostPort = "";
|
||||
try {
|
||||
|
@ -269,10 +262,6 @@
|
|||
<menuitem id="AllowPopups" label="&cookieAllowPopupsCmd.label;"
|
||||
accesskey="&cookieAllowPopupsCmd.accesskey;"
|
||||
oncommand="viewPopups(popupHost());"/>
|
||||
<menuitem id="AboutPopups" label="&cookieAboutPopupBlocking.label;"
|
||||
accesskey="&cookieAboutPopupBlocking.accesskey;"
|
||||
oncommand="OpenAboutPopups();"
|
||||
hidden="true"/>
|
||||
<menuitem id="ManagePopups" label="&cookieManagePopups.label;"
|
||||
accesskey="&cookieManagePopups.accesskey;"
|
||||
oncommand="viewPopups('');"
|
||||
|
|
|
@ -31,8 +31,6 @@
|
|||
|
||||
<!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">
|
||||
|
||||
|
|
|
@ -124,7 +124,6 @@
|
|||
locale/@AB_CD@/communicator/migration/migration.dtd (%chrome/common/migration/migration.dtd)
|
||||
locale/@AB_CD@/communicator/migration/migration.properties (%chrome/common/migration/migration.properties)
|
||||
locale/@AB_CD@/communicator/overrides/netErrorApp.dtd (%chrome/common/overrides/netErrorApp.dtd)
|
||||
locale/@AB_CD@/communicator/permissions/aboutPopups.dtd (%chrome/common/permissions/aboutPopups.dtd)
|
||||
locale/@AB_CD@/communicator/permissions/cookieViewer.properties (%chrome/common/permissions/cookieViewer.properties)
|
||||
locale/@AB_CD@/communicator/permissions/cookieViewer.dtd (%chrome/common/permissions/cookieViewer.dtd)
|
||||
locale/@AB_CD@/communicator/permissions/imageContextOverlay.dtd (%chrome/common/permissions/imageContextOverlay.dtd)
|
||||
|
|
|
@ -314,6 +314,5 @@ classic.jar:
|
|||
skin/classic/navigator/icons/chevron.gif (navigator/icons/chevron.gif)
|
||||
skin/classic/navigator/icons/close.gif (navigator/icons/close.gif)
|
||||
skin/classic/navigator/icons/popup-blocked.png (navigator/icons/popup-blocked.png)
|
||||
skin/classic/navigator/icons/about-popups.gif (navigator/icons/about-popups.gif)
|
||||
skin/classic/navigator/icons/tab-drag-indicator.gif (navigator/icons/tab-drag-indicator.gif)
|
||||
skin/classic/navigator/icons/tab-new.gif (navigator/icons/tab-new.gif)
|
||||
|
|
|
@ -330,11 +330,6 @@ toolbar[mode="text"] .toolbarbutton-1 .toolbarbutton-text {
|
|||
list-style-image: url("chrome://navigator/skin/icons/popup-blocked.png");
|
||||
}
|
||||
|
||||
#popupImage {
|
||||
list-style-image: url("chrome://navigator/skin/icons/about-popups.gif");
|
||||
margin: 6px 0px;
|
||||
}
|
||||
|
||||
/* ::::: personal toolbar ::::: */
|
||||
|
||||
#bookmarks-button {
|
||||
|
|
|
@ -466,7 +466,6 @@ modern.jar:
|
|||
skin/modern/navigator/icons/browser.png (navigator/icons/browser.png)
|
||||
skin/modern/navigator/icons/browser-small.png (navigator/icons/browser-small.png)
|
||||
skin/modern/navigator/icons/popup-blocked.png (navigator/icons/popup-blocked.png)
|
||||
skin/modern/navigator/icons/about-popups.gif (navigator/icons/about-popups.gif)
|
||||
skin/modern/navigator/icons/tab-drag-indicator.gif (navigator/icons/tab-drag-indicator.gif)
|
||||
skin/modern/navigator/icons/tab-new.gif (navigator/icons/tab-new.gif)
|
||||
skin/modern/navigator/icons/tab-new-hov.gif (navigator/icons/tab-new-hov.gif)
|
||||
|
|
|
@ -590,8 +590,3 @@ toolbarbutton.chevron > .toolbarbutton-menu-dropmarker {
|
|||
#popupIcon {
|
||||
list-style-image: url("chrome://navigator/skin/icons/popup-blocked.png");
|
||||
}
|
||||
|
||||
#popupImage {
|
||||
list-style-image: url("chrome://navigator/skin/icons/about-popups.gif");
|
||||
margin: 6px 0px;
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче