From bbcf1dabd26bb4e93aa4780d1771c3b449c068ec Mon Sep 17 00:00:00 2001 From: NunoSempere Date: Tue, 28 Mar 2023 11:19:11 -0600 Subject: Revert "tweak: move things around" This reverts commit ca59138a2aef96960381f986b8c683634e4d8e63. --- src/plugins/style/README.md | 5 ---- src/plugins/style/recompute_STYLE_N.sh | 8 ------ src/plugins/style/style.c | 30 --------------------- src/plugins/style/style.h | 8 ------ src/plugins/style/style.js | 49 ---------------------------------- 5 files changed, 100 deletions(-) delete mode 100644 src/plugins/style/README.md delete mode 100755 src/plugins/style/recompute_STYLE_N.sh delete mode 100644 src/plugins/style/style.c delete mode 100644 src/plugins/style/style.h delete mode 100644 src/plugins/style/style.js (limited to 'src/plugins/style') 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: . -- 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 -#include -#include -#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: - -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" -- cgit v1.2.3