diff options
Diffstat (limited to 'src/plugins/style')
-rw-r--r-- | src/plugins/style/README.md | 5 | ||||
-rwxr-xr-x | src/plugins/style/recompute_STYLE_N.sh | 8 | ||||
-rw-r--r-- | src/plugins/style/style.c | 30 | ||||
-rw-r--r-- | src/plugins/style/style.h | 8 | ||||
-rw-r--r-- | src/plugins/style/style.js | 49 |
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" |