Introduction
Introduction Statistics Contact Development Disclaimer Help
support global exception rules (untested) - surf-adblock - Surf adblock web ext…
git clone git://git.codemadness.org/surf-adblock
Log
Files
Refs
README
LICENSE
---
commit 13facacc65a3b7895f171618c0e031a437ec53b3
parent 2b628faccbbc89cc5e6a73029b7131929e51f4fb
Author: Hiltjo Posthuma <[email protected]>
Date: Sun, 4 Jun 2017 18:41:38 +0200
support global exception rules (untested)
Diffstat:
M adblock.c | 11 +++++++----
1 file changed, 7 insertions(+), 4 deletions(-)
---
diff --git a/adblock.c b/adblock.c
@@ -904,6 +904,7 @@ init(void)
{
struct filterrule *r;
FILE *fp;
+ const char *s;
char filepath[PATH_MAX], *e;
size_t len;
int n;
@@ -952,10 +953,12 @@ init(void)
cleanup();
return;
}
- len = sizeof("{display:none;}") - 1;
- if (string_append(&globalcss, "{display:none;}", len) < len) {
- weprintf("cannot append css rule "
- "to global css selectors\n");
+
+ s = r->isexception ? "{display:initial;}" : "{display:none;}";
+ len = strlen(s);
+ if (string_append(&globalcss, s, len) < len) {
+ weprintf("cannot append CSS rule "
+ "to global CSS selectors\n");
cleanup();
return;
}
You are viewing proxied material from codemadness.org. The copyright of proxied material belongs to its original authors. Any comments or complaints in relation to proxied material should be directed to the original authors of the content concerned. Please see the disclaimer for more details.