diff --git a/mozilla/browser/app/profile/firefox.js b/mozilla/browser/app/profile/firefox.js
index bd8fd81b3b3..afa331a4021 100644
--- a/mozilla/browser/app/profile/firefox.js
+++ b/mozilla/browser/app/profile/firefox.js
@@ -263,6 +263,10 @@ pref("dom.disable_window_open_feature.status", true);
// cannot do it by default because it affects UE for web applications.
pref("dom.disable_window_open_feature.location", false);
pref("dom.disable_window_status_change", true);
+// prevent JS from moving/resizing existing windows
+pref("dom.disable_window_move_resize", true);
+// prevent JS from monkeying with window focus, etc
+pref("dom.disable_window_flip", true);
pref("browser.trim_user_and_password", true);
diff --git a/mozilla/browser/components/preferences/advanced-scripts.xul b/mozilla/browser/components/preferences/advanced-scripts.xul
new file mode 100644
index 00000000000..d916f7ce007
--- /dev/null
+++ b/mozilla/browser/components/preferences/advanced-scripts.xul
@@ -0,0 +1,84 @@
+
+
+# -*- Mode: Java; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*-
+# 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 the Firefox Preferences System.
+#
+# The Initial Developer of the Original Code is Mike Connor.
+# Portions created by the Initial Developer are Copyright (C) 2005
+# the Initial Developer. All Rights Reserved.
+#
+# Contributor(s):
+# Mike Connor
+#
+# 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 *****
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/mozilla/browser/components/preferences/content.js b/mozilla/browser/components/preferences/content.js
index 742bcbca435..00c346950b4 100644
--- a/mozilla/browser/components/preferences/content.js
+++ b/mozilla/browser/components/preferences/content.js
@@ -164,37 +164,12 @@ var gContentPane = {
return undefined;
},
- readAnnoyancesEnabled: function ()
+ showAdvancedJS: function ()
{
- var contextMenuPref = document.getElementById("dom.event.contextmenu.enabled");
- var windowMovePref = document.getElementById("dom.disable_window_move_resize");
- var windowFlipPref = document.getElementById("dom.disable_window_flip");
- var hideStatusPref = document.getElementById("dom.disable_window_open_feature.status");
- var windowStatusPref = document.getElementById("dom.disable_window_status_change");
- return !contextMenuPref.value && windowMovePref.value &&
- windowFlipPref.value && hideStatusPref.value &&
- windowStatusPref.value;
+ document.documentElement.openSubDialog("chrome://browser/content/preferences/advanced-scripts.xul",
+ "", null);
},
-
- writeAnnoyancesEnabled: function ()
- {
- var contextMenuPref = document.getElementById("dom.event.contextmenu.enabled");
- var windowMovePref = document.getElementById("dom.disable_window_move_resize");
- var windowFlipPref = document.getElementById("dom.disable_window_flip");
- var hideStatusPref = document.getElementById("dom.disable_window_open_feature.status");
- var windowStatusPref = document.getElementById("dom.disable_window_status_change");
-
- var disableAnnoyances = document.getElementById("disableAnnoyances");
- contextMenuPref.value = !(windowMovePref.value = windowFlipPref.value = hideStatusPref.value = windowStatusPref.value = disableAnnoyances.checked);
- return this.readAnnoyancesEnabled();
- },
-
- annoyancesPrefChanged: function ()
- {
- var jsannoyancesPref = document.getElementById("browser.jsannoyances.disabled");
- jsannoyancesPref.updateElements();
- },
-
+
showFonts: function ()
{
document.documentElement.openSubDialog("chrome://browser/content/preferences/fonts.xul",
diff --git a/mozilla/browser/components/preferences/content.xul b/mozilla/browser/components/preferences/content.xul
index 538cab1dcb1..0aa35da9969 100644
--- a/mozilla/browser/components/preferences/content.xul
+++ b/mozilla/browser/components/preferences/content.xul
@@ -50,19 +50,6 @@
-
-
-
-
-
-
-
+
+
+
diff --git a/mozilla/browser/components/preferences/jar.mn b/mozilla/browser/components/preferences/jar.mn
index f04651519b5..6ff9fee6aac 100644
--- a/mozilla/browser/components/preferences/jar.mn
+++ b/mozilla/browser/components/preferences/jar.mn
@@ -1,6 +1,7 @@
browser.jar:
* content/browser/preferences/advanced.xul
* content/browser/preferences/advanced.js
+* content/browser/preferences/advanced-scripts.xul
* content/browser/preferences/changeaction.xul
* content/browser/preferences/changeaction.js
* content/browser/preferences/colors.xul
diff --git a/mozilla/browser/locales/en-US/chrome/browser/preferences/advanced-scripts.dtd b/mozilla/browser/locales/en-US/chrome/browser/preferences/advanced-scripts.dtd
new file mode 100644
index 00000000000..e4ea8cc452e
--- /dev/null
+++ b/mozilla/browser/locales/en-US/chrome/browser/preferences/advanced-scripts.dtd
@@ -0,0 +1,52 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/mozilla/browser/locales/en-US/chrome/browser/preferences/content.dtd b/mozilla/browser/locales/en-US/chrome/browser/preferences/content.dtd
index 0cf0744dfda..1580cbc8a5b 100644
--- a/mozilla/browser/locales/en-US/chrome/browser/preferences/content.dtd
+++ b/mozilla/browser/locales/en-US/chrome/browser/preferences/content.dtd
@@ -4,9 +4,8 @@
-
-
-
+
+
diff --git a/mozilla/browser/locales/en-US/chrome/help/firebird-toc.rdf b/mozilla/browser/locales/en-US/chrome/help/firebird-toc.rdf
index 8ad4456367a..500a685f84e 100644
--- a/mozilla/browser/locales/en-US/chrome/help/firebird-toc.rdf
+++ b/mozilla/browser/locales/en-US/chrome/help/firebird-toc.rdf
@@ -422,6 +422,7 @@
+
diff --git a/mozilla/browser/locales/en-US/chrome/help/prefs.xhtml b/mozilla/browser/locales/en-US/chrome/help/prefs.xhtml
index c6268c1ebce..870714afd86 100644
--- a/mozilla/browser/locales/en-US/chrome/help/prefs.xhtml
+++ b/mozilla/browser/locales/en-US/chrome/help/prefs.xhtml
@@ -233,13 +233,28 @@ Contributors:
JavaScript is often used to dynamically validate forms and select buttons.
Disabling JavaScript may cause some sites to not work properly.
-
Having JavaScript enabled exposes you to certain annoyances. Select the
- but disable common annoyances checkbox to disallow sites to
- move or resize existing windows,
- raise or lower windows,
- disable or replace context menus,
- hide the status bar,
- or change status bar text.
+
Advanced JavaScript Settings
+
+
Move or resize existing windows
+
Uncheck this &pref.singular; to disable moving and resizing windows using
+ scripts.
+
+
Raise or lower windows
+
Uncheck this &pref.singular; to make sure scripts cannot raise or lower
+ windows.
+
+
Disable or replace context menus
+
Uncheck this &pref.singular; to prevent web pages from disabling or changing
+ the &brandShortName; context menu.
+
+
Hide the status bar
+
Uncheck this &pref.singular; to force the status bar to be displayed in popup
+ windows.
+
+
Change status bar text
+
Uncheck this &pref.singular; to disable annoying status bar text scrolling and
+ Web address hiding.