diff options
Diffstat (limited to 'plugins')
-rw-r--r-- | plugins/libre_redirect/libre_redirect.c | 2 | ||||
-rwxr-xr-x | plugins/style/recompute_STYLE_N.sh | 2 | ||||
-rw-r--r-- | plugins/style/style.c | 2 | ||||
-rw-r--r-- | plugins/style/style.h | 2 | ||||
-rw-r--r-- | plugins/style/style.js | 18 |
5 files changed, 22 insertions, 4 deletions
diff --git a/plugins/libre_redirect/libre_redirect.c b/plugins/libre_redirect/libre_redirect.c index 9d9f414..330522c 100644 --- a/plugins/libre_redirect/libre_redirect.c +++ b/plugins/libre_redirect/libre_redirect.c @@ -43,7 +43,7 @@ int libre_redirect(const char* uri, char* output) }; char* alternatives[] = { - "https://teddit.nunosempere.com", + "https://old.reddit.com", // "https://teddit.nunosempere.com", "https://yt.artemislena.eu", "https://search.nunosempere.com", "https://scribe.rip", diff --git a/plugins/style/recompute_STYLE_N.sh b/plugins/style/recompute_STYLE_N.sh index 09faed2..9202894 100755 --- a/plugins/style/recompute_STYLE_N.sh +++ b/plugins/style/recompute_STYLE_N.sh @@ -5,5 +5,5 @@ sed_wrapper() } ## e.g., sedr "s/target/replacement/g" STYLE_N=`wc -c style.js | cut -d " " -f 1` -sed_wrapper "s/^#define STYLE_N .*/#define STYLE_N $STYLE_N + 1/g" +sed_wrapper "s/^#define STYLE_N .*/#define STYLE_N $STYLE_N + 100/g" diff --git a/plugins/style/style.c b/plugins/style/style.c index ed7b274..3e907b8 100644 --- a/plugins/style/style.c +++ b/plugins/style/style.c @@ -1,7 +1,7 @@ #include <stdio.h> #include <stdlib.h> #include <string.h> -#define STYLE_N 4023 + 1 +#define STYLE_N 4390 + 100 void read_style_js(char* string) { diff --git a/plugins/style/style.h b/plugins/style/style.h index f11f210..43f34c7 100644 --- a/plugins/style/style.h +++ b/plugins/style/style.h @@ -1,7 +1,7 @@ #ifndef STYLE #define STYLE -#define STYLE_N 4023 + 1 +#define STYLE_N 4390 + 100 void read_style_js(char* string); diff --git a/plugins/style/style.js b/plugins/style/style.js index 8d3254c..c142373 100644 --- a/plugins/style/style.js +++ b/plugins/style/style.js @@ -70,6 +70,24 @@ if (document.domain == "twitter.com" ){ ` } +if (document.domain == "reddit.com" || document.domain == "old.reddit.com"){ + styles = ` + /* kill sidebar ads */ + .native-ad-container, + .premium-banner-outer, + .native-sidebar-ad, + .infobar-toaster-container, + #eu-cookie-policy, + .ad-container, + a[href="/premium"], + [data-promoted^="true"], + a[href^="https://alb.reddit.com"] + { + display: none !important; + } + ` +} + if(styles != null){ var styleSheet = document.createElement('style') styleSheet.innerText = styles |