diff options
| Commit | 3fd11ce4830ca4ff03479478bfd6ad0ce80c7eed (patch) | |
|---|---|---|
| Author | 2022-07-19 14:27:07 +0300 | |
| Committer | 2022-07-19 14:27:07 +0300 | |
| Files | d1a59b4976ca9c15ea5a0b6fb4c617df1de538b5 | |
| goodwolf-3fd11ce4830ca4ff03479478bfd6ad0ce80c7eed.tar goodwolf-3fd11ce4830ca4ff03479478bfd6ad0ce80c7eed.tar.gz goodwolf-3fd11ce4830ca4ff03479478bfd6ad0ce80c7eed.zip | ||
| Parent | 12cbd061058a5e5a23380fce66169d34af3de746 (diff) | |
goodwolf: Added the switch -j for enabling JavaScript by default for all tabs
1 files changed, 5 insertions, 1 deletions
| -rw-r--r-- | goodwolf.c | 6 |
@@ -34,6 +34,7 @@ static gboolean alt_useragent = false; static int custom_favicon_size = 30; static gboolean persistent_storage = false; static gboolean separated_storage = false; +static gboolean enabled_javascript = false; static gboolean WebViewCb_close(WebKitWebView *webView, gpointer user_data); static gboolean WebViewCb_web_process_terminated(WebKitWebView *webView, @@ -809,7 +810,7 @@ new_browser(struct Window *window, const gchar *target_url, struct Client *old_b webkit_settings_set_user_agent(settings, "Mozilla/5.0 (Windows NT 10.0; WOW64; rv:74.0) Gecko/20100101 Firefox/74.0"); gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(browser->javascript), - webkit_settings_get_enable_javascript_markup(settings)); + webkit_settings_get_enable_javascript_markup(settings) || enabled_javascript); gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(browser->auto_load_images), webkit_settings_get_auto_load_images(settings)); @@ -1156,6 +1157,7 @@ main(int argc, char *argv[]) printf("\ goodwolf [OPTIONS] [URLs]\n\n\ Options:\n\ +-j JavaScript is enabled by default for all tabs\n\ -s DD Specifies a custom favicon size, where DD is a two digit number\n\ -nl Tabs won't have a label (page title)\n\ -cl Tabs will have a context label (text that identifies every tab)\n\ @@ -1291,6 +1293,8 @@ Options:\n\ persistent_storage = TRUE; else if (argv[1][1] == 'g') separated_storage = TRUE; + else if (argv[1][1] == 'j') + enabled_javascript = TRUE; else if (argv[1][1] == 's') { argv++; argc--; |