diff options
author | Ruben Rodriguez <ruben@gnu.org> | 2015-10-10 11:27:07 -0500 |
---|---|---|
committer | Ruben Rodriguez <ruben@gnu.org> | 2015-10-12 23:20:55 -0500 |
commit | 1b277f8e11d53af04ef645f95fb32857035e3a33 (patch) | |
tree | fe12cf093ddd152f7cbc03240afe60723a77275c | |
parent | 3bd364a1a8dee1316bd5c432229d83a30822927b (diff) |
Reworked enable-js-options.patch
-rw-r--r-- | data/patches/enable-js-options.patch | 268 |
1 files changed, 268 insertions, 0 deletions
diff --git a/data/patches/enable-js-options.patch b/data/patches/enable-js-options.patch new file mode 100644 index 0000000..aa2869e --- /dev/null +++ b/data/patches/enable-js-options.patch @@ -0,0 +1,268 @@ +# revert https://bug851702.bugzilla.mozilla.org/attachment.cgi?id=733785 + +# HG changeset patch +# User Gijs Kruitbosch <gijskruitbosch@gmail.com> +# Date 1365155574 -7200 +# Node ID 444b9baa31d6065d37edbd61a2dcb892c989e0e2 +# Parent 99121d529b47ec285d61f64988335e60ac120cf7 +Bug 851702 - Remove JS load and advanced preferences from the UI + +--- b/browser/components/preferences/content.xul ++++ a/browser/components/preferences/content.xul +@@ -25,8 +25,13 @@ + <!-- DRM content --> + <preference id="media.eme.enabled" name="media.eme.enabled" type="bool"/> + +- <!-- POPUPS --> ++ <!-- POPUPS, JAVASCRIPT --> + <preference id="dom.disable_open_during_load" name="dom.disable_open_during_load" type="bool"/> ++ <preference id="javascript.enabled" name="javascript.enabled" type="bool"/> ++ ++ <preference id="pref.advanced.javascript.disable_button.advanced" ++ name="pref.advanced.javascript.disable_button.advanced" ++ type="bool"/> + + <!-- FONTS --> + <preference id="font.language.group" +@@ -75,6 +80,20 @@ + accesskey="&popupExceptions.accesskey;"/> + </hbox> + </row> ++ <row id="enableJavaScriptRow"> ++ <vbox align="start"> ++ <checkbox id="enableJavaScript" preference="javascript.enabled" ++ label="&enableJavaScript.label;" accesskey="&enableJavaScript.accesskey;" ++ onsyncfrompreference="return gContentPane.updateButtons('advancedJSButton', ++ 'javascript.enabled');"/> ++ </vbox> ++ <vbox> ++ <button id="advancedJSButton" label="&advancedJS.label;" ++ accesskey="&advancedJS.accesskey;" ++ oncommand="gContentPane.showAdvancedJS();" ++ preference="pref.advanced.javascript.disable_button.advanced"/> ++ </vbox> ++ </row> + </rows> + </grid> + </groupbox> + +--- b/browser/components/preferences/in-content/content.xul ++++ a/browser/components/preferences/in-content/content.xul +@@ -11,10 +11,16 @@ + name="media.eme.enabled" + type="bool"/> + +- <!-- Popups --> ++ <!-- Popups and javascript --> + <preference id="dom.disable_open_during_load" + name="dom.disable_open_during_load" + type="bool"/> ++ <preference id="javascript.enabled" ++ name="javascript.enabled" ++ type="bool"/> ++ <preference id="pref.advanced.javascript.disable_button.advanced" ++ name="pref.advanced.javascript.disable_button.advanced" ++ type="bool"/> + + <!-- Fonts --> + <preference id="font.language.group" +@@ -80,6 +86,20 @@ + accesskey="&popupExceptions.accesskey;"/> + </hbox> + </row> ++ <row id="enableJavaScriptRow"> ++ <vbox align="start"> ++ <checkbox id="enableJavaScript" preference="javascript.enabled" ++ label="&enableJavaScript.label;" accesskey="&enableJavaScript.accesskey;" ++ onsyncfrompreference="return gContentPane.updateButtons('advancedJSButton', ++ 'javascript.enabled');"/> ++ </vbox> ++ <vbox> ++ <button id="advancedJSButton" label="&advancedJS.label;" ++ accesskey="&advancedJS.accesskey;" ++ oncommand="gContentPane.showAdvancedJS();" ++ preference="pref.advanced.javascript.disable_button.advanced"/> ++ </vbox> ++ </row> + </rows> + </grid> + </groupbox> + +--- b/browser/components/preferences/jar.mn ++++ a/browser/components/preferences/jar.mn +@@ -4,16 +4,17 @@ + + browser.jar: + content/browser/preferences/aboutPermissions.xul + content/browser/preferences/aboutPermissions.js + content/browser/preferences/aboutPermissions.css + content/browser/preferences/aboutPermissions.xml + * content/browser/preferences/advanced.xul + * content/browser/preferences/advanced.js ++ content/browser/preferences/advanced-scripts.xul + content/browser/preferences/applications.xul + * content/browser/preferences/applications.js + content/browser/preferences/applicationManager.xul + * content/browser/preferences/applicationManager.js + * content/browser/preferences/colors.xul + * content/browser/preferences/cookies.xul + content/browser/preferences/cookies.js + content/browser/preferences/content.xul +--- b/browser/locales/en-US/chrome/browser/preferences/content.dtd ++++ a/browser/locales/en-US/chrome/browser/preferences/content.dtd +@@ -2,16 +2,25 @@ + - License, v. 2.0. If a copy of the MPL was not distributed with this + - file, You can obtain one at http://mozilla.org/MPL/2.0/. --> + + <!ENTITY blockPopups.label "Block pop-up windows"> + <!ENTITY blockPopups.accesskey "B"> + <!ENTITY popupExceptions.label "Exceptions…"> + <!ENTITY popupExceptions.accesskey "E"> + ++<!ENTITY enableJavaScript.label "Enable JavaScript"> ++<!ENTITY enableJavaScript.accesskey "J"> ++<!ENTITY advancedJS.label "Advanced…"> ++<!ENTITY advancedJS.accesskey "v"> ++ ++<!ENTITY enableJava.label "Enable Java"> ++<!ENTITY enableJava.accesskey "n"> ++ ++ + <!ENTITY fontsAndColors.label "Fonts & Colors"> + + <!ENTITY defaultFont.label "Default font:"> + <!ENTITY defaultFont.accesskey "D"> + <!ENTITY defaultSize.label "Size:"> + <!ENTITY defaultSize.accesskey "S"> + + <!ENTITY advancedFonts.label "Advanced…"> +--- b/browser/locales/jar.mn ++++ a/browser/locales/jar.mn +@@ -81,16 +81,17 @@ + #endif + locale/browser/feeds/subscribe.dtd (%chrome/browser/feeds/subscribe.dtd) + locale/browser/feeds/subscribe.properties (%chrome/browser/feeds/subscribe.properties) + locale/browser/migration/migration.dtd (%chrome/browser/migration/migration.dtd) + locale/browser/migration/migration.properties (%chrome/browser/migration/migration.properties) + locale/browser/preferences/aboutPermissions.dtd (%chrome/browser/preferences/aboutPermissions.dtd) + locale/browser/preferences/aboutPermissions.properties (%chrome/browser/preferences/aboutPermissions.properties) + locale/browser/preferences/advanced.dtd (%chrome/browser/preferences/advanced.dtd) ++ locale/browser/preferences/advanced-scripts.dtd (%chrome/browser/preferences/advanced-scripts.dtd) + locale/browser/preferences/applicationManager.dtd (%chrome/browser/preferences/applicationManager.dtd) + locale/browser/preferences/applicationManager.properties (%chrome/browser/preferences/applicationManager.properties) + locale/browser/preferences/colors.dtd (%chrome/browser/preferences/colors.dtd) + locale/browser/preferences/cookies.dtd (%chrome/browser/preferences/cookies.dtd) + locale/browser/preferences/content.dtd (%chrome/browser/preferences/content.dtd) + locale/browser/preferences/connection.dtd (%chrome/browser/preferences/connection.dtd) + locale/browser/preferences/applications.dtd (%chrome/browser/preferences/applications.dtd) + locale/browser/preferences/fonts.dtd (%chrome/browser/preferences/fonts.dtd) +--- b/browser/components/preferences/content.js 2014-05-07 17:02:34.000000000 +0200 ++++ a/browser/components/preferences/content.js 2014-04-28 01:52:01.000000000 +0200 +@@ -57,7 +57,18 @@ + "chrome://browser/content/preferences/permissions.xul", + "", params); + }, ++ ++ // JAVASCRIPT + ++ /** ++ * Displays the advanced JavaScript preferences for enabling or disabling ++ * various annoying behaviors. ++ */ ++ showAdvancedJS: function () ++ { ++ openDialog("chrome://browser/content/preferences/advanced-scripts.xul", ++ "Browser:AdvancedScripts", null); ++ }, + + // FONTS + +--- b/browser/components/preferences/in-content/content.js 2014-04-28 01:52:01.000000000 +0200 ++++ a/browser/components/preferences/in-content/content.js 2014-05-07 17:01:48.000000000 +0200 +@@ -58,6 +58,18 @@ + "Browser:Permissions", "resizable=yes", params); + }, + ++ // JAVASCRIPT ++ ++ /** ++ * Displays the advanced JavaScript preferences for enabling or disabling ++ * various annoying behaviors. ++ */ ++ showAdvancedJS: function () ++ { ++ openDialog("chrome://browser/content/preferences/advanced-scripts.xul", ++ "Browser:AdvancedScripts", null); ++ }, ++ + // FONTS + + /** +diff --git a/browser/components/preferences/advanced-scripts.xul b/browser/components/preferences/advanced-scripts.xul +--- /dev/null ++++ a/browser/components/preferences/advanced-scripts.xul +@@ -0,0 +1,46 @@ ++<?xml version="1.0"?> ++ ++<!-- -*- Mode: Java; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- --> ++<!-- This Source Code Form is subject to the terms of the Mozilla Public ++ - License, v. 2.0. If a copy of the MPL was not distributed with this ++ - file, You can obtain one at http://mozilla.org/MPL/2.0/. --> ++ ++<!DOCTYPE prefwindow SYSTEM "chrome://browser/locale/preferences/advanced-scripts.dtd"> ++ ++<?xml-stylesheet href="chrome://global/skin/"?> ++ ++<prefwindow id="AdvancedJSDialog" type="child" ++ xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul" ++ title="&advancedJSDialog.title;" ++ dlgbuttons="accept,cancel,help" ++ ondialoghelp="openPrefsHelp()"> ++ ++ <script type="application/javascript" src="chrome://browser/content/utilityOverlay.js"/> ++ ++ <prefpane id="AdvancedJSDialogPane" ++ helpTopic="prefs-advanced-javascript"> ++ ++ <preferences> ++ <preference id="dom.event.contextmenu.enabled" name="dom.event.contextmenu.enabled" type="bool"/> ++ <preference id="dom.disable_window_move_resize" name="dom.disable_window_move_resize" type="bool" inverted="true"/> ++ <preference id="dom.disable_window_flip" name="dom.disable_window_flip" type="bool" inverted="true"/> ++ </preferences> ++ ++ <script type="application/javascript" src="chrome://browser/content/preferences/advanced-scripts.js"/> ++ ++ <stringbundle id="preferencesBundle" src="chrome://browser/locale/preferences/preferences.properties"/> ++ ++ <description value="&allowScripts.label;"/> ++ ++ <checkbox id="moveResizePopupWindows" label="&moveResizePopupWindows.label;" ++ accesskey="&moveResizePopupWindows.accesskey;" ++ preference="dom.disable_window_move_resize"/> ++ <checkbox id="raiseLowerWindows" label="&raiseLowerWindows.label;" ++ accesskey="&raiseLowerWindows.accesskey;" ++ preference="dom.disable_window_flip"/> ++ <checkbox id="disableContextMenus" label="&disableContextMenus.label;" ++ accesskey="&disableContextMenus.accesskey;" ++ preference="dom.event.contextmenu.enabled"/> ++ ++ </prefpane> ++</prefwindow> +--- /dev/null ++++ a/browser/locales/en-US/chrome/browser/preferences/advanced-scripts.dtd +@@ -0,0 +1,15 @@ ++<!-- This Source Code Form is subject to the terms of the Mozilla Public ++ - License, v. 2.0. If a copy of the MPL was not distributed with this ++ - file, You can obtain one at http://mozilla.org/MPL/2.0/. --> ++ ++<!ENTITY advancedJSDialog.title "Advanced JavaScript Settings"> ++<!ENTITY window.width "37em"> ++ ++<!ENTITY allowScripts.label "Allow scripts to:"> ++ ++<!ENTITY moveResizePopupWindows.label "Move or resize popup windows"> ++<!ENTITY moveResizePopupWindows.accesskey "M"> ++<!ENTITY raiseLowerWindows.label "Raise or lower windows"> ++<!ENTITY raiseLowerWindows.accesskey "R"> ++<!ENTITY disableContextMenus.label "Disable or replace context menus"> ++<!ENTITY disableContextMenus.accesskey "D"> |