aboutsummaryrefslogtreecommitdiff
path: root/src/plugins/style
diff options
context:
space:
mode:
authorNunoSempere <nuno.sempere@protonmail.com>2023-03-28 11:19:11 -0600
committerNunoSempere <nuno.sempere@protonmail.com>2023-03-28 11:19:11 -0600
commitbbcf1dabd26bb4e93aa4780d1771c3b449c068ec (patch)
tree375468f139ee1032626969d9965cd18eaaec50e8 /src/plugins/style
parentca59138a2aef96960381f986b8c683634e4d8e63 (diff)
Revert "tweak: move things around"
This reverts commit ca59138a2aef96960381f986b8c683634e4d8e63.
Diffstat (limited to 'src/plugins/style')
-rw-r--r--src/plugins/style/README.md5
-rwxr-xr-xsrc/plugins/style/recompute_STYLE_N.sh8
-rw-r--r--src/plugins/style/style.c30
-rw-r--r--src/plugins/style/style.h8
-rw-r--r--src/plugins/style/style.js49
5 files changed, 0 insertions, 100 deletions
diff --git a/src/plugins/style/README.md b/src/plugins/style/README.md
deleted file mode 100644
index e0aad62..0000000
--- a/src/plugins/style/README.md
+++ /dev/null
@@ -1,5 +0,0 @@
-## Customize css style for individual websites.
-
-- Replicates: <https://addons.mozilla.org/en-GB/firefox/addon/styl-us/>.
-- The template is similar to the readability folder.
-- You will also want to customize the `style.c` file.
diff --git a/src/plugins/style/recompute_STYLE_N.sh b/src/plugins/style/recompute_STYLE_N.sh
deleted file mode 100755
index 906aad8..0000000
--- a/src/plugins/style/recompute_STYLE_N.sh
+++ /dev/null
@@ -1,8 +0,0 @@
-#!/bin/bash
-function sedr(){
- find ./ -type f -exec sed -i -e "$1" {} \;
-} ## e.g., sedr "s/target/replacement/g"
-
-STYLE_N=$(wc -c style.js | cut -d " " -f 1)
-sedr "s/^#define STYLE_N .*/#define STYLE_N $STYLE_N + 1/g"
-
diff --git a/src/plugins/style/style.c b/src/plugins/style/style.c
deleted file mode 100644
index 1010506..0000000
--- a/src/plugins/style/style.c
+++ /dev/null
@@ -1,30 +0,0 @@
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-#define STYLE_N 1393 + 1
-
-void read_style_js(char* string)
-{
- FILE* fp = fopen("/home/loki/Documents/core/software/fresh/C/rose-browser/rosenrot/plugins/style/style.js", "r");
- if (!fp) { // fp is NULL, fopen failed
- fprintf(stderr, "Failed to open file\n");
- string = NULL;
- return;
- }
- int i = 0;
- int c;
- while ((c = fgetc(fp)) != EOF) {
- string[i++] = c;
- }
- string[i] = '\0';
- fclose(fp);
-}
-
-/*
-int main(){
- char* readability_js = malloc(STYLE_N+1);
- read_readability_js(readability_js);
- printf("%s", readability_js);
- free(readability_js);
-}
-*/
diff --git a/src/plugins/style/style.h b/src/plugins/style/style.h
deleted file mode 100644
index 5e5d76b..0000000
--- a/src/plugins/style/style.h
+++ /dev/null
@@ -1,8 +0,0 @@
-#ifndef STYLE
-#define STYLE
-
-#define STYLE_N 1393 + 1
-
-void read_style_js(char* string);
-
-#endif
diff --git a/src/plugins/style/style.js b/src/plugins/style/style.js
deleted file mode 100644
index bc0540e..0000000
--- a/src/plugins/style/style.js
+++ /dev/null
@@ -1,49 +0,0 @@
-// Replicates the Stylus app: <https://addons.mozilla.org/en-GB/firefox/addon/styl-us/>
-
-var styles = null;
-
-if (document.domain == "forum.effectivealtruism.org"){
- styles = `
- .Layout-main {
- margin-left: 100px;
- }
- .SingleColumnSection-root {
- width: 1000px !important;
- max-width: 1400px !important;
- padding-left: 100px !important;
- }
- .NavigationStandalone-sidebar {
- display: none;
- }
- .intercom-lightweight-app{
- display: none;
- }
- `
- var styleSheet = document.createElement('style')
- styleSheet.innerText = styles
- document.head.appendChild(styleSheet)
- console.log('Style changed')
-}
-
-if (document.domain == "mail.proton.me" ){
- styles = `
- .item-container-row.read, .item-container.read {
- background-color: white;
- }
- .item-container-row.unread, .item-container.unread {
- background-color: #E8E8E8;
- }
- .selection .item-container-row.item-is-selected, .item-container.item-is-selected {
- background-color: var(--selection-background-color) !important;
- }
- `
-}
-
-if(styles != null){
- var styleSheet = document.createElement('style')
- styleSheet.innerText = styles
- document.head.appendChild(styleSheet)
- console.log('Style changed')
-}
-
-document.body.style.visibility = "visible"