Posted at 20:13h
in
news
by MetaFuture
iframe.iframef{
max-width:1400px;
}
var iframe = document.querySelector('.iframef');
var url = iframe.getAttribute('src');
iframe.setAttribute('src',url + '&host=' + document.location.hostname);
iframe.onload = function() {
iframe.contentWindow.postMessage('getElementSize', '*');
};
window.onresize = function() {
iframe.contentWindow.postMessage('getElementSize', '*');
};
window.addEventListener(
"message",
(event) => {
if (event.origin !== "https://deepblueseries.com"){return}else{
if(event.data.redirect){
window.location.href=event.data.redirect;
} else if(event.data.size){
var size = event.data.size;
iframe.setAttribute('height', size.height + 40 + 'px');
}
}
},
false,
);
DCA functions by allocating a set amount of capital for purchases of a...