From 5e42ab4b00f3625b902cc3bfa4ecfbc30bfcaa9f Mon Sep 17 00:00:00 2001 From: NunoSempere Date: Sun, 11 Feb 2024 16:58:35 +0100 Subject: move plugins code to config.h --- config.h | 17 +++++++++++++++++ rose.c | 18 ++---------------- 2 files changed, 19 insertions(+), 16 deletions(-) diff --git a/config.h b/config.h index 34951ff..250781c 100644 --- a/config.h +++ b/config.h @@ -16,6 +16,23 @@ #define SEARCH "https://lite.duckduckgo.com/html/?q=%s" // "https://search.nunosempere.com/search?q=%s" #define HOME ROSE_HOMEPAGE ? "file:///home/loki/Documents/core/software/fresh/C/rose-browser/rosenrot/user-scripts/ubuntu-20.04/rose-images/rose-homepage.png" : "https://search.nunosempere.com/" +// Plugins +#define LIBRE_REDIRECT_ENABLED true +#define READABILITY_ENABLED true +#define CUSTOM_STYLE_ENABLED true +#define CUSTOM_USER_AGENT false +/* +To disable plugins: +1. set their corresponding variable to false +2. you could also look into this file at commit afe93518a for an approach using stand-in code. +3. recompile + +To remove plugins completely; +1. Remove the corresponding code in this file by looking for the variables above. +2. Remove PLUGIN and $(PLUGIN) from the makefiel +3. Recompile +*/ + // Webkit settings // See: https://webkitgtk.org/reference/webkit2gtk/stable/class.Settings.html #define WEBKIT_DEFAULT_SETTINGS \ diff --git a/rose.c b/rose.c index 4287994..3bc03d0 100644 --- a/rose.c +++ b/rose.c @@ -19,24 +19,10 @@ static struct { enum { _SEARCH, _FIND, _HIDDEN } entry_mode; } bar; -/* Plugins */ -#define LIBRE_REDIRECT_ENABLED true -#define READABILITY_ENABLED true -#define CUSTOM_STYLE_ENABLED true -#define CUSTOM_USER_AGENT false +// Number of open tabs static int num_tabs = 0; -/* -To disable plugins: -1. set their corresponding variable to false -2. you could also look into this file at commit afe93518a for an approach using stand-in code. -3. recompile - -To remove plugins completely; -1. Remove the corresponding code in this file by looking for the variables above. -2. Remove PLUGIN and $(PLUGIN) from the makefiel -3. Recompile -*/ +/* */ WebKitWebView* webview_new() { char* style; -- cgit v1.2.3