Compare commits
No commits in common. "a7192d5e5c18ff9e27a511c81374e99395f73e07" and "7eaa3fc29bf8b714e2e181609504b4a8e75b8b1a" have entirely different histories.
a7192d5e5c
...
7eaa3fc29b
4
config.h
4
config.h
|
@ -34,8 +34,8 @@ To disable plugins:
|
||||||
3. recompile
|
3. recompile
|
||||||
|
|
||||||
To remove plugins completely;
|
To remove plugins completely;
|
||||||
1. Remove the corresponding code in the rosenrot.c by looking for the variables above.
|
1. Remove the corresponding code in this file by looking for the variables above.
|
||||||
2. Remove PLUGIN and $(PLUGIN) from the makefile
|
2. Remove PLUGIN and $(PLUGIN) from the makefiel
|
||||||
3. Recompile
|
3. Recompile
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
5
makefile
5
makefile
|
@ -48,8 +48,6 @@ runtime_files:
|
||||||
sudo mkdir -p /opt/rosenrot/
|
sudo mkdir -p /opt/rosenrot/
|
||||||
sudo cp style.css /opt/rosenrot/
|
sudo cp style.css /opt/rosenrot/
|
||||||
sudo cp -r images/flower-imgs /opt/rosenrot/
|
sudo cp -r images/flower-imgs /opt/rosenrot/
|
||||||
sudo cp plugins/style/style.js /opt/rosenrot/
|
|
||||||
sudo cp plugins/readability/readability.js /opt/rosenrot/
|
|
||||||
|
|
||||||
install: rosenrot runtime_files
|
install: rosenrot runtime_files
|
||||||
cp -f rosenrot /usr/bin
|
cp -f rosenrot /usr/bin
|
||||||
|
@ -69,7 +67,8 @@ format: $(SRC) $(PLUGINS)
|
||||||
$(FORMATTER) $(SRC) $(PLUGINS) $(rosenrot.h)
|
$(FORMATTER) $(SRC) $(PLUGINS) $(rosenrot.h)
|
||||||
|
|
||||||
lint:
|
lint:
|
||||||
clang-tidy $(SRC) $(PLUGINS) -- -Wall -O3 $(INCS) -o rosenrot $(LIBS)
|
clang-tidy $(SRC) $(PLUGINS) -- -Wall -O3 `pkg-config --cflags 'webkit2gtk-4.1'` -o rosenrot `pkg-config --libs 'webkit2gtk-4.1'`
|
||||||
|
|
||||||
## A few more commands:
|
## A few more commands:
|
||||||
|
|
||||||
fast: $(SRC) $(PLUGINS) $(CONFIG)
|
fast: $(SRC) $(PLUGINS) $(CONFIG)
|
||||||
|
|
|
@ -5,10 +5,9 @@
|
||||||
|
|
||||||
void read_readability_js(char* string)
|
void read_readability_js(char* string)
|
||||||
{
|
{
|
||||||
FILE* fp = fopen("/opt/rosenrot/readability.js", "r");
|
FILE* fp = fopen("/home/nuno/Documents/workspace/rosenrot/plugins/readability/readability.js", "r");
|
||||||
if (!fp) { // fp is NULL, fopen failed
|
if (!fp) { // fp is NULL, fopen failed
|
||||||
fprintf(stderr, "Failed to open file\n");
|
fprintf(stderr, "Failed to open file\n");
|
||||||
fprintf(stderr, "Consider running $ sudo make runtime_files\n");
|
|
||||||
string = NULL;
|
string = NULL;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
|
@ -31,8 +31,6 @@ int shortcut_expand(const char* uri, char* output)
|
||||||
strcpy(tmp_output, output);
|
strcpy(tmp_output, output);
|
||||||
|
|
||||||
char* shortcuts[] = {
|
char* shortcuts[] = {
|
||||||
"!x",
|
|
||||||
"!blog",
|
|
||||||
"!fnf",
|
"!fnf",
|
||||||
"!fnc",
|
"!fnc",
|
||||||
"!hn",
|
"!hn",
|
||||||
|
@ -40,8 +38,6 @@ int shortcut_expand(const char* uri, char* output)
|
||||||
};
|
};
|
||||||
|
|
||||||
char* expansions[] = {
|
char* expansions[] = {
|
||||||
"https://twitter.com",
|
|
||||||
"https://nunosempere.com/blog",
|
|
||||||
"https://forum.nunosempere.com/frontpage",
|
"https://forum.nunosempere.com/frontpage",
|
||||||
"https://forum.nunosempere.com/comments",
|
"https://forum.nunosempere.com/comments",
|
||||||
"https://news.ycombinator.com",
|
"https://news.ycombinator.com",
|
||||||
|
|
|
@ -1,11 +1,11 @@
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#define STYLE_N 7275 + 1000
|
#define STYLE_N 7265 + 1000
|
||||||
|
|
||||||
void read_style_js(char* string)
|
void read_style_js(char* string)
|
||||||
{
|
{
|
||||||
FILE* fp = fopen("/opt/rosenrot/style.js", "r");
|
FILE* fp = fopen("/home/nuno/Documents/workspace/rosenrot/plugins/style/style.js", "r");
|
||||||
if (!fp) { // fp is NULL, fopen failed
|
if (!fp) { // fp is NULL, fopen failed
|
||||||
fprintf(stderr, "Failed to open file\n");
|
fprintf(stderr, "Failed to open file\n");
|
||||||
string = NULL;
|
string = NULL;
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
#ifndef STYLE
|
#ifndef STYLE
|
||||||
#define STYLE
|
#define STYLE
|
||||||
|
|
||||||
#define STYLE_N 7275 + 1000
|
#define STYLE_N 7265 + 1000
|
||||||
|
|
||||||
void read_style_js(char* string);
|
void read_style_js(char* string);
|
||||||
|
|
||||||
|
|
|
@ -3,7 +3,6 @@
|
||||||
var styles = null;
|
var styles = null;
|
||||||
|
|
||||||
if (document.domain == "forum.effectivealtruism.org") {
|
if (document.domain == "forum.effectivealtruism.org") {
|
||||||
/*
|
|
||||||
styles = `
|
styles = `
|
||||||
.Layout-main {
|
.Layout-main {
|
||||||
margin-left: 100px;
|
margin-left: 100px;
|
||||||
|
@ -24,7 +23,6 @@ if (document.domain == "forum.effectivealtruism.org") {
|
||||||
styleSheet.innerText = styles;
|
styleSheet.innerText = styles;
|
||||||
document.head.appendChild(styleSheet);
|
document.head.appendChild(styleSheet);
|
||||||
console.log("Style changed");
|
console.log("Style changed");
|
||||||
*/
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (document.domain == "mail.proton.me") {
|
if (document.domain == "mail.proton.me") {
|
||||||
|
|
Loading…
Reference in New Issue
Block a user