in readability, center images and add max-width.

This commit is contained in:
NunoSempere 2023-09-15 12:39:14 +03:00
parent aaeb755c64
commit 2ce2830351
4 changed files with 16 additions and 10 deletions

View File

@ -1,7 +1,7 @@
#include <stdio.h> #include <stdio.h>
#include <stdlib.h> #include <stdlib.h>
#include <string.h> #include <string.h>
#define READABILITY_N 85314 + 1000 #define READABILITY_N 85433 + 1000
void read_readability_js(char* string) void read_readability_js(char* string)
{ {

View File

@ -1,7 +1,7 @@
#ifndef READABILITY #ifndef READABILITY
#define READABILITY #define READABILITY
#define READABILITY_N 85314 + 1000 #define READABILITY_N 85433 + 1000
void read_readability_js(char* string); void read_readability_js(char* string);

View File

@ -2377,10 +2377,18 @@ document.body.innerHTML = `<h1>${article.title}</h1>\n${article.content}`
/* Hack for archive.is */ /* Hack for archive.is */
var styles var styles = `
img {
max-width: 80% !important;
height: auto;
display: block;
margin-left: auto;
margin-right: auto;
}
`
if (document.domain == "archive.is" ){ if (document.domain == "archive.is" ){
styles = ` styles+= `
li > span { li > span {
display: none !important; display: none !important;
@ -2400,9 +2408,7 @@ if (document.domain == "archive.is" ){
` `
} }
if(styles != null){
var styleSheet = document.createElement('style') var styleSheet = document.createElement('style')
styleSheet.innerText = styles styleSheet.innerText = styles
document.head.appendChild(styleSheet) document.head.appendChild(styleSheet)
console.log('Style changed') console.log('Style changed')
}

BIN
rose

Binary file not shown.