tweak: nicer blockquotes

also fix bug in archive.is / bloomberg.
This commit is contained in:
NunoSempere 2023-02-14 02:07:23 +01:00
parent 86fef30c22
commit 6a330e9b09
4 changed files with 39 additions and 3 deletions

View File

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

View File

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

View File

@ -2319,6 +2319,21 @@ body {
left: 0;
width: 100%;
}
/* Block quotes */
blockquote{
width:60%;
margin: 5px auto;
font-style:italic;
color: #555555;
padding: 1.2em 30px 1.2em 75px;
border-left:8px solid #005386 ;
line-height:1.3;
position: relative;
background: #F0F0F0;
}
</style>`
/*
@ -2338,3 +2353,24 @@ var documentClone = document.cloneNode(true);
var article = new Readability(documentClone).parse();
document.head.innerHTML = `<title>${article.title}</title>\n${style_sheet_simple}`
document.body.innerHTML = `<h1>${article.title}</h1>\n${article.content}`
/* Hack for archive.is */
var styles
if (document.domain == "archive.is" ){
styles = `
li > span {
display: none; !important
}
`
}
if(styles != null){
var styleSheet = document.createElement('style')
styleSheet.innerText = styles
document.head.appendChild(styleSheet)
console.log('Style changed')
}

View File

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