mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-09-02 22:17:03 +03:00
18 lines
549 B
JavaScript
18 lines
549 B
JavaScript
(()=>{
|
|
|
|
const
|
|
buffer = 0, //was 5 but this was creating a white space of 5px at the bottom of the page
|
|
ifr = document.getElementById('rliframe'),
|
|
pageY = elem => elem.offsetParent ? (elem.offsetTop + pageY(elem.offsetParent)) : elem.offsetTop,
|
|
resizeIframe = () => {
|
|
var height = document.documentElement.clientHeight;
|
|
height -= pageY(ifr) + buffer;
|
|
height = (height < 0) ? 0 : height;
|
|
ifr.style.height = height + 'px';
|
|
};
|
|
if (ifr) {
|
|
ifr.onload = resizeIframe;
|
|
window.onresize = resizeIframe;
|
|
}
|
|
|
|
})();
|