Improved dark mode colors remover

Improved data-x-src:hover font-size
This commit is contained in:
djmaze 2021-03-05 11:44:13 +01:00
parent b6d1df2f82
commit 43e107b0cb
3 changed files with 5 additions and 6 deletions

View file

@ -57,11 +57,9 @@ const
do {
l = html.length;
html = html
.replace(/(<[^>]+);?background(-color)?\s*:[^;"']+/gi, '$1')
.replace(/(<[^>]+[^-]);?color\s*:[^;"']+/gi, '$1')
.replace(/(<[^>]+[^-])\sbgcolor="[^"]+"/gi, '$1')
.replace(/(<[^>]+[^-])\scolor="[^"]+"/gi, '$1');
//.replace(/<\/?font[^>]+>/gmi, '')
.replace(/(<[^>]+)[;"']\s*background(-[a-z]+)?\s*:[^;"']+/gi, '$1')
.replace(/(<[^>]+)[;"']\s*color\s*:[^;"']+/gi, '$1')
.replace(/(<[^>]+)\s(bg)?color=("[^"]+"|'[^']+')/gi, '$1');
} while (l != html.length)
return html;
};