[epiphany] Remove the enable-javascript preference
- From: Michael Catanzaro <mcatanzaro src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [epiphany] Remove the enable-javascript preference
- Date: Fri, 14 Oct 2016 21:23:00 +0000 (UTC)
commit 39c355cbe361627fe0c5ddfe3d24f33cb3197277
Author: Michael Catanzaro <mcatanzaro gnome org>
Date: Fri Oct 14 14:07:12 2016 -0500
Remove the enable-javascript preference
Unfortunately too many Epiphany features are implemented with JavaScript
message handlers. We never noticed that they were broken for ages, which
indicates that nobody is using this setting. It's too coarse-grained.
hardly anybody wants to browse the web with no JavaScript at all;
rather, people want NoScript-style ability to block scripts only on
particular sites. We can bring this back in the future if it's (a)
implemented on a host-specific basis, (b) preferably with UI so that
people can actually use it, our little NoScript, and (c) accordingly,
not going to break our script message handlers.
data/org.gnome.epiphany.gschema.xml | 5 -----
embed/ephy-embed-prefs.c | 6 +-----
lib/ephy-prefs.h | 1 -
3 files changed, 1 insertions(+), 11 deletions(-)
---
diff --git a/data/org.gnome.epiphany.gschema.xml b/data/org.gnome.epiphany.gschema.xml
index 94ac4ec..62e0190 100644
--- a/data/org.gnome.epiphany.gschema.xml
+++ b/data/org.gnome.epiphany.gschema.xml
@@ -189,11 +189,6 @@
<default>true</default>
<summary>Enable Plugins</summary>
</key>
- <key type="b" name="enable-javascript">
- <default>true</default>
- <summary>Enable JavaScript</summary>
- <description>Whether to enable support for JavaScript. Note that several Epiphany
features are implemented in JavaScript and will break if this setting is changed.</description>
- </key>
<key type="b" name="enable-webgl">
<default>true</default>
<summary>Enable WebGL</summary>
diff --git a/embed/ephy-embed-prefs.c b/embed/ephy-embed-prefs.c
index cf0b9d3..bbcd624 100644
--- a/embed/ephy-embed-prefs.c
+++ b/embed/ephy-embed-prefs.c
@@ -39,7 +39,6 @@ typedef struct {
void (*callback)(GSettings *settings, const char *key, gpointer data);
} PrefData;
-#define ENABLE_SCRIPTS_SETTING "enable-javascript"
#define DEFAULT_ENCODING_SETTING "default-charset"
static WebKitSettings *webkit_settings = NULL;
@@ -552,6 +551,7 @@ ephy_embed_prefs_init (gpointer user_data)
webkit_settings = webkit_settings_new_with_settings ("enable-developer-extras", TRUE,
"enable-fullscreen", TRUE,
+ "enable-javascript", TRUE,
"enable-site-specific-quirks", TRUE,
"enable-dns-prefetching", TRUE,
"javascript-can-open-windows-automatically", TRUE,
@@ -584,10 +584,6 @@ ephy_embed_prefs_init (gpointer user_data)
G_CALLBACK (gtk_settings_xft_dpi_changed_cb), NULL);
}
- g_settings_bind (EPHY_SETTINGS_WEB,
- EPHY_PREFS_WEB_ENABLE_JAVASCRIPT,
- webkit_settings, ENABLE_SCRIPTS_SETTING,
- G_SETTINGS_BIND_GET);
g_settings_bind (EPHY_SETTINGS_MAIN,
EPHY_PREFS_ENABLE_CARET_BROWSING,
webkit_settings, "enable-caret-browsing",
diff --git a/lib/ephy-prefs.h b/lib/ephy-prefs.h
index ed4bc52..b86db28 100644
--- a/lib/ephy-prefs.h
+++ b/lib/ephy-prefs.h
@@ -87,7 +87,6 @@ typedef enum
#define EPHY_PREFS_WEB_ENABLE_USER_CSS "enable-user-css"
#define EPHY_PREFS_WEB_ENABLE_POPUPS "enable-popups"
#define EPHY_PREFS_WEB_ENABLE_PLUGINS "enable-plugins"
-#define EPHY_PREFS_WEB_ENABLE_JAVASCRIPT "enable-javascript"
#define EPHY_PREFS_WEB_ENABLE_SPELL_CHECKING "enable-spell-checking"
#define EPHY_PREFS_WEB_ENABLE_WEBGL "enable-webgl"
#define EPHY_PREFS_WEB_ENABLE_WEBAUDIO "enable-webaudio"
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]