feat: make reader mode right

Use a whiter background, which is nicer on my screen.

Add plugin step to install.sh
This commit is contained in:
NunoSempere 2022-12-16 01:03:35 +01:00
parent 31be29c7cb
commit cd6b158e3e
6 changed files with 30 additions and 15 deletions

View File

@ -29,7 +29,7 @@
#define KEY(x) GDK_KEY_##x #define KEY(x) GDK_KEY_##x
#define ZOOM 1.4 /* Starting zoom level.*/ #define ZOOM 1.4 /* Starting zoom level.*/
#define ZOOM_VAL .1 /* Zooming value in zoomin/zoomout functions */ #define ZOOM_VAL .1 /* Zooming value in zoomin/zoomout functions */
#define BG_COLOR "#FEFEFE" /*"#1E1E2E" */ #define BG_COLOR "#FFFFFF" /* "FEFEFE", "#1E1E2E" */
#define DEBUG false #define DEBUG false
typedef enum { typedef enum {

View File

@ -1,3 +1,5 @@
./plugins/*/*.sh
./build.sh && { ./build.sh && {
cp -f rose /usr/bin cp -f rose /usr/bin
mkdir -p /usr/share/themes/rose mkdir -p /usr/share/themes/rose

View File

@ -1,7 +1,7 @@
#include <stdio.h> #include <stdio.h>
#include <string.h> #include <string.h>
#include <stdlib.h> #include <stdlib.h>
#define READABILITY_N 83768 #define READABILITY_N 84254 + 1
void read_readability_js(char* string){ void read_readability_js(char* string){
FILE *fp=fopen("/home/loki/Documents/core/software/fresh/C/rose-browser/rose-bud-personal/plugins/readability/readability.js", "r"); FILE *fp=fopen("/home/loki/Documents/core/software/fresh/C/rose-browser/rose-bud-personal/plugins/readability/readability.js", "r");

View File

@ -1,7 +1,7 @@
#ifndef READABILITY #ifndef READABILITY
#define READABILITY #define READABILITY
#define READABILITY_N 83768 #define READABILITY_N 84254 + 1
void read_readability_js(char* string); void read_readability_js(char* string);

View File

@ -2304,19 +2304,32 @@ var style_sheet_simple = `
body { body {
padding: 40px 200px 40px 200px; padding: 40px 200px 40px 200px;
background-color: "#FDFDFD";
font-size: 18px; font-size: 18px;
font: 18px/1.5 Roboto;
line-height: 1.6;
background-color: #FFFFFF !important;
color: #000000 !important;
} }
#readOverlay { #readOverlay {
display: block; display: block;
position: absolute; position: absolute;
background-color: white;
top: 0; top: 0;
left: 0; left: 0;
width: 100%; width: 100%;
} }
</style>` </style>`
/*
body {
max-width: 650px;
margin: 40px auto;
padding: 0 10px;
font: 18px/1.5 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";
color: #444
}
*/
/* See also /* See also
* <https://gist.github.com/aanand/399131> * <https://gist.github.com/aanand/399131>
* and the one included in firefox @ <chrome://global/skin/aboutReader.css> * and the one included in firefox @ <chrome://global/skin/aboutReader.css>

4
plugins/readability/recompute_READABILITY_N.sh Normal file → Executable file
View File

@ -3,6 +3,6 @@ function sedr(){
find ./ -type f -exec sed -i -e "$1" {} \; find ./ -type f -exec sed -i -e "$1" {} \;
} ## e.g., sedr "s/target/replacement/g" } ## e.g., sedr "s/target/replacement/g"
READABILITY_N=$(wc -c readability.js | cut -d " " -f 1) READABILITY_N=$(wc -c ./plugins/*/readability.js | cut -d " " -f 1)
sedr "s/^#define READABILITY_N .*/#define READABILITY_N $READABILITY_N/g" sedr "s/^#define READABILITY_N .*/#define READABILITY_N $READABILITY_N + 1/g"