summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPeter Hofmann <scm@uninformativ.de>2017-10-25 18:23:10 +0200
committerGitHub <noreply@github.com>2017-10-25 18:23:10 +0200
commita2e1d9ca515ff2b887c66d9cc5a832b6fb77a467 (patch)
treecfd6b003533bca8fa27873d25bb359fd6a324301
parentf11297ceaa05760363836272a3e1e04d3eb12f46 (diff)
parent5a9941176f737c788e58091497ce206a6fd518bd (diff)
downloadlariza-a2e1d9ca515ff2b887c66d9cc5a832b6fb77a467.tar.gz
Merge pull request #55 from fvgh/console_to_stdout
Support WebKit "enable-write-console-messages-to-stdout"
-rw-r--r--browser.c8
-rw-r--r--man1/lariza.13
2 files changed, 11 insertions, 0 deletions
diff --git a/browser.c b/browser.c
index 75688b9..969d981 100644
--- a/browser.c
+++ b/browser.c
@@ -76,6 +76,7 @@ static gboolean cooperative_instances = TRUE;
static int cooperative_pipe_fp = 0;
static gchar *download_dir = "/var/tmp";
static gboolean enable_webgl = FALSE;
+static gboolean enable_console_to_stdout = FALSE;
static Window embed = 0;
static gchar *fifo_suffix = "main";
static gdouble global_zoom = 1.0;
@@ -204,6 +205,9 @@ client_new(const gchar *uri, WebKitWebView *related_wv, gboolean show)
g_object_set(G_OBJECT(webkit_web_view_get_settings(WEBKIT_WEB_VIEW(c->web_view))),
"user-agent", user_agent, NULL);
+ if (enable_console_to_stdout)
+ webkit_settings_set_enable_write_console_messages_to_stdout(webkit_web_view_get_settings(WEBKIT_WEB_VIEW(c->web_view)), TRUE);
+
if (enable_webgl)
webkit_settings_set_enable_webgl(webkit_web_view_get_settings(WEBKIT_WEB_VIEW(c->web_view)), TRUE);
@@ -593,6 +597,10 @@ grab_environment_configuration(void)
if (e != NULL)
download_dir = g_strdup(e);
+ e = g_getenv(__NAME_UPPERCASE__"_ENABLE_CONSOLE_TO_STDOUT");
+ if (e != NULL)
+ enable_console_to_stdout = TRUE;
+
e = g_getenv(__NAME_UPPERCASE__"_ENABLE_EXPERIMENTAL_WEBGL");
if (e != NULL)
enable_webgl = TRUE;
diff --git a/man1/lariza.1 b/man1/lariza.1
index 6cbfa81..9c5a92f 100644
--- a/man1/lariza.1
+++ b/man1/lariza.1
@@ -52,6 +52,9 @@ stick to XDG directories, then you should configure your
This variable defaults to \fB/var/tmp\fP.
.TP
+\fBLARIZA_ENABLE_CONSOLE_TO_STDOUT\fP
+Enable writing WebKit console messages to stdout.
+.TP
\fBLARIZA_ENABLE_EXPERIMENTAL_WEBGL\fP
Enable WebGL support in WebKit if this variable is set. Note that this
is an \fBEXPERIMENTAL\fP feature. This setting could vanish from