Exclude emojis + Append styles instead of overwriting

This commit is contained in:
Alexey Leshchenko 2021-05-21 09:16:55 +03:00
parent e9691ae206
commit d8e5c9b351

View File

@ -90,8 +90,9 @@ for (let i = 0; i < anchorLinks.length; i++) {
// fix the problem with images having an annoying extra padding // fix the problem with images having an annoying extra padding
// in Webkit renderers on iOS devices // in Webkit renderers on iOS devices
const imgs = document.getElementsByTagName("img"); const imgs = document.querySelectorAll("img:not(.notion-emoji)");
for (let i = 0; i < imgs.length; i++) { for (let i = 0; i < imgs.length; i++) {
imgs[i].parentElement.setAttribute("style", "height:auto!important;"); parent = imgs[i].parentElement
} parent.setAttribute("style", parent.getAttribute("style") + "; height:auto!important;");
}