use -O3 -Wall gcc flags, add old.reddit.com css
This commit is contained in:
parent
e2c81f2595
commit
b87693e4c5
2
config.h
2
config.h
|
@ -12,7 +12,7 @@
|
|||
#define SEARCH "https://search.nunosempere.com/search?q=%s" // "https://lite.duckduckgo.com/html/?q=%s"
|
||||
#define HOME ROSE_HOMEPAGE ? "file:///home/loki/Documents/core/software/fresh/C/rose-browser/rosenrot/user-scripts/ubuntu-20.04/rose-images/rose-homepage.png" : "https://search.nunosempere.com/"
|
||||
// #define HOME ROSE_HOMEPAGE ? "file:///home/loki/Documents/core/software/fresh/C/rose-browser/rosenrot/user-scripts/ubuntu-20.04/rose-images/rose-homepage.png" : "https://search.nunosempere.com/"
|
||||
#define CACHE_DIR "/home/loki/.cache/rose"
|
||||
#define CACHE_DIR "/home/root/.cache/rose"
|
||||
|
||||
#define WIDTH 1920 // 960 for half-width, 1920 for full width
|
||||
#define HEIGHT 1080
|
||||
|
|
4
makefile
4
makefile
|
@ -7,6 +7,8 @@
|
|||
|
||||
## C compiler
|
||||
CC=gcc # gcc: more options. Also I don't know whether tcc has error messages/debug options.
|
||||
WARNINGS=-Wall
|
||||
OPTIMIZED=-O3 #-Ofast
|
||||
## CC=tcc # tcc: much faster
|
||||
|
||||
## Main file
|
||||
|
@ -68,7 +70,7 @@ build: $(SRC) $(PLUGS) $(CONFIG)
|
|||
sed -i "s|$(DEFAULT_DIR)|$(CURRENT_DIR)|g" {} +
|
||||
# Compile rosenrot
|
||||
GIO_MODULE_DIR=/usr/lib/x86_64-linux-gnu/gio/modules/
|
||||
$(CC) $(DEBUG) $(INCS) $(PLUGS) $(SRC) -o rose $(LIBS) $(ADBLOCK)
|
||||
$(CC) $(WARNINGS) $(OPTIMIZED) $(DEBUG) $(INCS) $(PLUGS) $(SRC) -o rose $(LIBS) $(ADBLOCK)
|
||||
|
||||
inspect: build
|
||||
GTK_DEBUG=interactive ./rose
|
||||
|
|
|
@ -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",
|
||||
|
|
|
@ -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"
|
||||
|
||||
|
|
|
@ -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)
|
||||
{
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
#ifndef STYLE
|
||||
#define STYLE
|
||||
|
||||
#define STYLE_N 4023 + 1
|
||||
#define STYLE_N 4390 + 100
|
||||
|
||||
void read_style_js(char* string);
|
||||
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue
Block a user