Add config option for Java activation

This commit is contained in:
Quentin Rameau 2017-05-11 15:27:27 +02:00
parent 298e688933
commit 93a3e4cda0
2 changed files with 6 additions and 0 deletions

View file

@ -21,6 +21,7 @@ static Parameter defconfig[ParameterLast] = {
SETB(Geolocation, 0), SETB(Geolocation, 0),
SETB(HideBackground, 0), SETB(HideBackground, 0),
SETB(Inspector, 0), SETB(Inspector, 0),
SETB(Java, 1),
SETB(JavaScript, 1), SETB(JavaScript, 1),
SETB(KioskMode, 0), SETB(KioskMode, 0),
SETB(LoadImages, 1), SETB(LoadImages, 1),

5
surf.c
View file

@ -72,6 +72,7 @@ typedef enum {
Geolocation, Geolocation,
HideBackground, HideBackground,
Inspector, Inspector,
Java,
JavaScript, JavaScript,
KioskMode, KioskMode,
LoadImages, LoadImages,
@ -718,6 +719,9 @@ setparameter(Client *c, int refresh, ParamName p, const Arg *a)
case Inspector: case Inspector:
webkit_settings_set_enable_developer_extras(s, a->b); webkit_settings_set_enable_developer_extras(s, a->b);
return; /* do not update */ return; /* do not update */
case Java:
webkit_settings_set_enable_java(s, a->b);
return; /* do not update */
case JavaScript: case JavaScript:
webkit_settings_set_enable_javascript(s, a->b); webkit_settings_set_enable_javascript(s, a->b);
break; break;
@ -1020,6 +1024,7 @@ newview(Client *c, WebKitWebView *rv)
"enable-frame-flattening", curconfig[FrameFlattening].val.b, "enable-frame-flattening", curconfig[FrameFlattening].val.b,
"enable-html5-database", curconfig[DiskCache].val.b, "enable-html5-database", curconfig[DiskCache].val.b,
"enable-html5-local-storage", curconfig[DiskCache].val.b, "enable-html5-local-storage", curconfig[DiskCache].val.b,
"enable-java", curconfig[Java].val.b,
"enable-javascript", curconfig[JavaScript].val.b, "enable-javascript", curconfig[JavaScript].val.b,
"enable-plugins", curconfig[Plugins].val.b, "enable-plugins", curconfig[Plugins].val.b,
"enable-accelerated-2d-canvas", curconfig[AcceleratedCanvas].val.b, "enable-accelerated-2d-canvas", curconfig[AcceleratedCanvas].val.b,