From 353d0ffad7c1810d2c5a87d73f6649bcbc55aad4 Mon Sep 17 00:00:00 2001 From: NunoSempere Date: Sun, 5 Feb 2023 03:21:30 +0100 Subject: feat: add plugin to customize css for individual websites... and how to enable it. Also tweak README.mds --- plugins/style/README.md | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100644 plugins/style/README.md (limited to 'plugins/style/README.md') diff --git a/plugins/style/README.md b/plugins/style/README.md new file mode 100644 index 0000000..0d11c54 --- /dev/null +++ b/plugins/style/README.md @@ -0,0 +1,34 @@ +## Customize css style for individual websites. + +- Replicates: . +- The template is similar to the readability folder. + +## To enable it + +In `build.sh`, uncomment this line: + +``` +REQS= #./plugins/*/*.c +``` + +In `rose.c`, uncomment: + + +``` +// #include "plugins/style/style.h" + +... + + // Add custom style + /* + char* style_js = malloc(STYLE_N+1); + read_style_js(style_js); + webkit_web_view_run_javascript(notebook_get_webview(notebook), + style_js, + NULL, NULL, NULL); + free(style_js); + */ + +``` + +You will also want to customize the `style.c` file. -- cgit v1.2.3 From b48c504871c4732895b00ae6c2a87c97a63ad3d8 Mon Sep 17 00:00:00 2001 From: NunoSempere Date: Sun, 5 Feb 2023 03:57:29 +0100 Subject: feat: use flags rather than uncommenting code - Significantly simpler - Easier for me to keep up with upstream - Alternatives: - Comments as before - git patches, as in the suckless community: eventually leads to confusion about conflicting patches. - some other option --- plugins/style/README.md | 31 +------------------------------ 1 file changed, 1 insertion(+), 30 deletions(-) (limited to 'plugins/style/README.md') diff --git a/plugins/style/README.md b/plugins/style/README.md index 0d11c54..e0aad62 100644 --- a/plugins/style/README.md +++ b/plugins/style/README.md @@ -2,33 +2,4 @@ - Replicates: . - The template is similar to the readability folder. - -## To enable it - -In `build.sh`, uncomment this line: - -``` -REQS= #./plugins/*/*.c -``` - -In `rose.c`, uncomment: - - -``` -// #include "plugins/style/style.h" - -... - - // Add custom style - /* - char* style_js = malloc(STYLE_N+1); - read_style_js(style_js); - webkit_web_view_run_javascript(notebook_get_webview(notebook), - style_js, - NULL, NULL, NULL); - free(style_js); - */ - -``` - -You will also want to customize the `style.c` file. +- You will also want to customize the `style.c` file. -- cgit v1.2.3