Summary Files Commits Branches @commit @diff @stats
diff options
context:
space:
mode:
Commit82af15d3533a143fac02c80f1405e8843d1d0f4e (patch)
Author
 Syndamia <kamen@syndamia.com>
2022-06-19 13:40:16 +0300
Committer
 Syndamia <kamen@syndamia.com>
2022-06-19 13:40:16 +0300
Files50feeb7cc17856d5e754066d695129ac1e653ee9
goodwolf-82af15d3533a143fac02c80f1405e8843d1d0f4e.tar
goodwolf-82af15d3533a143fac02c80f1405e8843d1d0f4e.tar.gz
goodwolf-82af15d3533a143fac02c80f1405e8843d1d0f4e.zip
Parent906f5332cc81561b457938efd87aac4603066236 (diff)
badwolf: Added a switch for alternative useragent
1 files changed, 6 insertions, 1 deletions
-rw-r--r--badwolf.c7
diff --git a/badwolf.c b/badwolf.c
index 8551035..52878db 100644
--- a/badwolf.c
+++ b/badwolf.c
@@ -29,7 +29,8 @@ GtkTreeModel *bookmarks_completion_model;
static gboolean tabs_no_label = false;
static gboolean tabs_constant = false;
static gboolean tray_enabled = false;
-static int custom_favicon_size = 0;
+static gboolean alt_useragent = false;
+static int custom_favicon_size = 30;
static gboolean WebViewCb_close(WebKitWebView *webView, gpointer user_data);
static gboolean WebViewCb_web_process_terminated(WebKitWebView *webView,
@@ -770,6 +771,8 @@ new_browser(struct Window *window, const gchar *target_url, struct Client *old_b
}
WebKitSettings *settings = webkit_settings_new_with_settings(BADWOLF_WEBKIT_SETTINGS);
+ if (alt_useragent == TRUE)
+ webkit_settings_set_user_agent(settings, "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:100.0) Gecko/20100101 Firefox/100.0");
gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(browser->javascript),
webkit_settings_get_enable_javascript_markup(settings));
@@ -1228,6 +1231,8 @@ main(int argc, char *argv[])
tabs_constant = TRUE;
if (argv[1][1] == 't')
tray_enabled = TRUE;
+ if (argv[1][1] == 'u')
+ alt_useragent = TRUE;
if (argv[1][1] == 's') {
argv++;
argc--;