mirror of
https://github.com/leoncvlt/loconotion.git
synced 2024-08-30 18:12:12 +00:00
Merge pull request #59 from flipio-ru/fix-ios-padding
Fixes the iOS extra image bottom padding issue
This commit is contained in:
commit
82431f4d7a
@ -86,3 +86,16 @@ for (let i = 0; i < anchorLinks.length; i++) {
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
// fix the problem with images having an annoying extra padding
|
||||
// in Webkit renderers on iOS devices
|
||||
|
||||
const imgs = document.querySelectorAll("img:not(.notion-emoji)");
|
||||
|
||||
for (let i = 0; i < imgs.length; i++) {
|
||||
parent = imgs[i].parentElement
|
||||
let style = parent.getAttribute("style")
|
||||
style = style.replace(/padding-bottom: 133\.333\%;/, "")
|
||||
style = style + "; height:auto!important;"
|
||||
parent.setAttribute("style", style);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user