diff options
author | portix <none@none> | 2013-02-27 10:06:55 +0100 |
---|---|---|
committer | portix <none@none> | 2013-02-27 10:06:55 +0100 |
commit | 244a3de85ed9d7ee77cc514fd2efa5b5336810c5 (patch) | |
tree | 795c615029c72f53dd66b8ae3946ba1d584fc598 /src/dwb.c | |
parent | 82119ac5df62069860b27fd4b783322c7a02bfb7 (diff) | |
parent | c1be2d00f1d6e55bdfea0f24f141b3dc73639c0e (diff) | |
download | dwb-244a3de85ed9d7ee77cc514fd2efa5b5336810c5.zip |
Automated merge with ssh://bitbucket.org/portix/dwb
Diffstat (limited to 'src/dwb.c')
-rw-r--r-- | src/dwb.c | 20 |
1 files changed, 18 insertions, 2 deletions
@@ -48,6 +48,7 @@ #include "application.h" #include "scripts.h" #include "dom.h" +#include "hsts.h" /* DECLARATIONS {{{*/ static DwbStatus dwb_webkit_setting(GList *, WebSettings *); @@ -179,6 +180,18 @@ dwb_set_accept_language(GList *gl, WebSettings *s) g_object_set(webkit_get_default_session(), "accept-language", s->arg_local.p, NULL); return STATUS_OK; }/*}}}*/ +void +dwb_set_hsts(GList *gl, WebSettings *s) +{ + if (s->arg_local.b) + { + hsts_activate(); + } + else + { + hsts_deactivate(); + } +} /*{{{*/ //static DwbStatus @@ -3334,8 +3347,8 @@ dwb_clean_up() // 'execute' can crash scripts_end(); - for (GList *l = dwb.keymap; l; l=l->next) - { + hsts_end(); /* Assumes it has access to dwb.settings */ + for (GList *l = dwb.keymap; l; l=l->next) { KeyMap *m = l->data; if (m->map->prop & CP_SCRIPT) { @@ -4283,6 +4296,8 @@ dwb_init_files() dwb_check_create(dwb.files[FILES_PLUGINS_ALLOW]); dwb.files[FILES_CUSTOM_KEYS] = g_build_filename(profile_path, "custom_keys", NULL); dwb_check_create(dwb.files[FILES_CUSTOM_KEYS]); + dwb.files[FILES_HSTS] = g_build_filename(profile_path, "hsts", NULL); + dwb_check_create(dwb.files[FILES_HSTS]); userscripts = g_build_filename(path, "userscripts", NULL); dwb.files[FILES_USERSCRIPTS] = util_check_directory(userscripts); @@ -4493,6 +4508,7 @@ dwb_init() dwb_init_hints(NULL, NULL); dwb_soup_init(); + hsts_init(); } /*}}}*/ /*}}}*/ /* FIFO {{{*/ |