From f5eb896c9cceec7a85ed98cb727e605252e27fa4 Mon Sep 17 00:00:00 2001 From: miguel Date: Fri, 16 Mar 2018 01:31:33 +0100 Subject: mostly cosmetics --- Makefile | 9 ++++++++- config.h | 3 +++ config.mk | 2 ++ piper_webext.c | 19 +++++++++++++++++++ piper_webext.h | 19 +++++++++++++++++++ surf.c | 3 +++ webext-piper.c | 2 +- 7 files changed, 55 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index ab81824..f3e3eaa 100644 --- a/Makefile +++ b/Makefile @@ -1,5 +1,7 @@ # surf - simple browser # See LICENSE file for copyright and license details. + +# Includes some ugly customizations by miguel (to incorporate his webext) .POSIX: include config.mk @@ -93,13 +95,18 @@ webext-clean: -rm webext-piper.o -rm webext-piper.so -superauto: +all-fresh-reinstall: make clean make webext-clean make make webext-build sudo make webext-install +all-clean: + make clean + make webext-clean + + diff --git a/config.h b/config.h index e1ab406..4744cec 100644 --- a/config.h +++ b/config.h @@ -1,3 +1,6 @@ +// Miguel's customized suckless surf's config + + /* modifier 0 means no modifier */ static int surfuseragent = 1; /* Append Surf version to default WebKit user agent */ static char *fulluseragent = ""; /* Or override the whole user agent string */ diff --git a/config.mk b/config.mk index 41f9790..a888436 100644 --- a/config.mk +++ b/config.mk @@ -1,3 +1,5 @@ +# surf makefile config, customized by miguel + # surf version VERSION = 2.0 diff --git a/piper_webext.c b/piper_webext.c index 3d0d3c1..72996c8 100644 --- a/piper_webext.c +++ b/piper_webext.c @@ -1,3 +1,22 @@ +// +// !!! THIS IS STILL A CONCEPT/PROTOTYPE. USE AT YOUR OWN RISK !!! +// +// Author: Michal Idziorek +// +// Last Update: 16th March 2018 +// +// Last Tested: with surf commit 81f0452bc6c2a110239fa303ad1e72f11c33dc94 +// from htps://git.suckless.org/surf +// +// The following simple Webkit2GTK+ extension was hacked together +// in the sleepless night between 09th and 10th March 2018 (and later +// refined). +// +// The DOM is manipulated,i.e: a with a number added to every +// link encountered. +// +// Named FIFO pipes are used for communication with the ui process. +// #include #include #include diff --git a/piper_webext.h b/piper_webext.h index 36d3aec..86d31ef 100644 --- a/piper_webext.h +++ b/piper_webext.h @@ -1,2 +1,21 @@ +// +// !!! THIS IS STILL A CONCEPT/PROTOTYPE. USE AT YOUR OWN RISK !!! +// +// Author: Michal Idziorek +// +// Last Update: 16th March 2018 +// +// Last Tested: with surf commit 81f0452bc6c2a110239fa303ad1e72f11c33dc94 +// from htps://git.suckless.org/surf +// +// The following simple Webkit2GTK+ extension was hacked together +// in the sleepless night between 09th and 10th March 2018 (and later +// refined). +// +// The DOM is manipulated,i.e: a with a number added to every +// link encountered. +// +// Named FIFO pipes are used for communication with the ui process. +// void piper_init(char *pipe_in,char *pipe_out,void (*callback_func)(char *msg),char *url); void piper_send(char *msg); diff --git a/surf.c b/surf.c index ffd4f0a..68a1930 100644 --- a/surf.c +++ b/surf.c @@ -2,6 +2,9 @@ * * To understand surf, start reading main(). */ + +// customizations by miguel. to incorporate his webextension +// #include #include #include diff --git a/webext-piper.c b/webext-piper.c index 19fd8e9..3435d8f 100644 --- a/webext-piper.c +++ b/webext-piper.c @@ -3,7 +3,7 @@ // // Author: Michal Idziorek // -// Last Update: 14th March 2018 +// Last Update: 16th March 2018 // // Last Tested: with surf commit 81f0452bc6c2a110239fa303ad1e72f11c33dc94 // from htps://git.suckless.org/surf -- cgit v1.2.3