aboutsummaryrefslogtreecommitdiff
path: root/plugins/style
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/style')
-rwxr-xr-xplugins/style/recompute_STYLE_N.sh2
-rw-r--r--plugins/style/style.c2
-rw-r--r--plugins/style/style.h2
-rw-r--r--plugins/style/style.js18
4 files changed, 21 insertions, 3 deletions
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