From 6362e4b4d40b751fafc225b02112693cdd9f14ff Mon Sep 17 00:00:00 2001 From: Dustin Falgout Date: Sun, 23 Oct 2016 09:39:12 -0500 Subject: [PATCH] code cleanup --- src/webkit2-extension.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/webkit2-extension.c b/src/webkit2-extension.c index bb83485..a4dca34 100644 --- a/src/webkit2-extension.c +++ b/src/webkit2-extension.c @@ -1904,6 +1904,10 @@ page_created_cb(WebKitWebExtension *extension, gboolean secure_mode; GError *err = NULL; + // save the page_id (global variable) + page_id = webkit_web_page_get_id(web_page); + + // Determine if secure_mode is enabled and connect callback to signal if so. secure_mode = get_config_option_as_bool("greeter", "secure_mode", err); if (FALSE == secure_mode && NULL == err) { @@ -1911,8 +1915,6 @@ page_created_cb(WebKitWebExtension *extension, return; } - page_id = webkit_web_page_get_id(web_page); - g_signal_connect( web_page, "send-request",