summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorrafa_99 <raroma09@gmail.com>2021-09-25 21:47:35 +0100
committerrafa_99 <raroma09@gmail.com>2021-09-25 21:47:35 +0100
commit9736f15a4c65d82e9f9bfbecac2d2d4e548425c3 (patch)
treebb5b5d4e076ad5b9965a56a75777701f50e476bf
parent23427f3348ab6fd50661669637d7e3761e9af095 (diff)
Updated Cookies Settings
-rw-r--r--src/config.def.h18
-rw-r--r--src/main.c12
2 files changed, 19 insertions, 11 deletions
diff --git a/src/config.def.h b/src/config.def.h
index 70a45b9..b0f12a8 100644
--- a/src/config.def.h
+++ b/src/config.def.h
@@ -54,17 +54,17 @@
#define SETTING_HOME_PAGE "about:blank"
#define SETTING_DOWNLOAD_PATH "~/Downloads"
/* cookie-accept allowed values always, origin, never */
-#define SETTING_COOKIE_ACCEPT "always"
+#define SETTING_COOKIE_ACCEPT "never"
#define SETTING_HINT_KEYS "0123456789"
#define SETTING_DOWNLOAD_COMMAND "/bin/sh -c \"curl -sLJOC - -e '$neovimb_URI' %s\""
-#define SETTING_COMPLETION_CSS "color:#fff;background-color:#656565;font:" SETTING_GUI_FONT_NORMAL
-#define SETTING_COMPLETION_HOVER_CSS "background-color:#777;"
-#define SETTING_COMPLETION_SELECTED_CSS "color:#f6f3e8;background-color:#888;"
-#define SETTING_INPUT_CSS "background-color:#fff;color:#000;font:" SETTING_GUI_FONT_NORMAL
-#define SETTING_INPUT_ERROR_CSS "background-color:#f77;font:" SETTING_GUI_FONT_EMPH
-#define SETTING_STATUS_CSS "color:#fff;background-color:#000;font:" SETTING_GUI_FONT_EMPH
-#define SETTING_STATUS_SSL_CSS "background-color:#95e454;color:#000;"
-#define SETTING_STATUS_SSL_INVLID_CSS "background-color:#f77;color:#000;"
+#define SETTING_COMPLETION_CSS "color:#ffffff;background-color:#656565;font:" SETTING_GUI_FONT_NORMAL
+#define SETTING_COMPLETION_HOVER_CSS "background-color:#777777;"
+#define SETTING_COMPLETION_SELECTED_CSS "color:#f6f3e8;background-color:#888888;"
+#define SETTING_INPUT_CSS "background-color:#ffffff;color:#000000;font:" SETTING_GUI_FONT_NORMAL
+#define SETTING_INPUT_ERROR_CSS "background-color:#ff7777;font:" SETTING_GUI_FONT_EMPH
+#define SETTING_STATUS_CSS "color:#ffffff;background-color:#000000;font:" SETTING_GUI_FONT_EMPH
+#define SETTING_STATUS_SSL_CSS "background-color:#95e454;color:#000000;"
+#define SETTING_STATUS_SSL_INVLID_CSS "background-color:#ff7777;color:#000000;"
#define MAXIMUM_HINTS 500
/* default window dimensions */
diff --git a/src/main.c b/src/main.c
index 7eedee9..cdb6dd6 100644
--- a/src/main.c
+++ b/src/main.c
@@ -1845,8 +1845,16 @@ static void neovimb_setup(void)
g_free(dataPath);
- // ToDo, Never cookies -- manager = webkit_website_data_manager_new_ephemeral();
- WebKitWebsiteDataManager *manager = webkit_website_data_manager_new("base-data-directory", util_get_data_dir(), "base-cache-directory", util_get_cache_dir(), NULL);
+ WebKitWebsiteDataManager *manager = NULL;
+ if ( strcmp(SETTING_COOKIE_ACCEPT, "never") == 0 )
+ {
+ manager = webkit_website_data_manager_new_ephemeral();
+ }
+ else
+ {
+ manager = webkit_website_data_manager_new("base-data-directory", util_get_data_dir(), "base-cache-directory", util_get_cache_dir(), NULL);
+ }
+
vb.webcontext = webkit_web_context_new_with_website_data_manager(manager);
manager = webkit_web_context_get_website_data_manager(vb.webcontext);
/* Use seperate rendering processed for the webview of the clients in the