Merge pull request #2098 from Wevah/master

master: Strip inline max-width and max-height from elements
This commit is contained in:
Maurice Parker 2020-05-20 17:53:42 -05:00 committed by GitHub
commit 314df88e12
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -19,7 +19,7 @@ function stripStylesFromElement(element, propertiesToStrip) {
function stripStyles() {
document.getElementsByTagName("body")[0].querySelectorAll("style, link[rel=stylesheet]").forEach(element => element.remove());
// Removing "background" and "font" will also remove properties that would be reflected in them, e.g., "background-color" and "font-family"
document.getElementsByTagName("body")[0].querySelectorAll("[style]").forEach(element => stripStylesFromElement(element, ["color", "background", "font"]));
document.getElementsByTagName("body")[0].querySelectorAll("[style]").forEach(element => stripStylesFromElement(element, ["color", "background", "font", "max-width", "max-height"]));
}
// Convert all Feedbin proxy images to be used as src, otherwise change image locations to be absolute if not already