Здравствуйте.
С недавних пор на сайте начали выскакивать баннеры с рекламой - и на десктопе, и на мобильных, при отключенном адблоке.
Заметил, что прямо перед блоком, который является рекламой, в коде появляется скрипт:
fr_30_0.onresize = function() {
frm = top.document.getElementById('div-mb-native-0-97').getElementsByTagName('iframe');
frmh = frm[1].height;
frm[1].style.removeProperty('height');
frm[1].style.setProperty('height', frmh + 'px', 'important');
frmh = frm[1].width;
frm[1].style.removeProperty('width');
frm[1].style.setProperty('width', frmh + 'px', 'important');
};
googletag.cmd.push(function() {
googletag.display('div-mb-native-0-97');
});
googletag.cmd.push(function() {
googletag.pubads().addEventListener('slotRenderEnded', function(event) {
var x = document.getElementById(event.slot.getSlotElementId());
if (event.isEmpty && x) {
x.style.display = 'none';
}
if (!event.isEmpty && x) {
var advText = x.parentElement.previousSibling;
advText.parentNode.removeChild(advText);
}
});
});
Сам блок состоит из следующего:
<div id="div-mb-native-0-97" style="" data-google-query-id="CImv57Ss6esCFZKBmgodc3YHQg">
<div id="google_ads_iframe_/145047668/RT/Native_0__container__" style="border: 0pt none;">
<iframe id="google_ads_iframe_/145047668/RT/Native_0" title="3rd party ad content" name="google_ads_iframe_/145047668/RT/Native_0" width="300" height="250" scrolling="no" marginwidth="0" marginheight="0" frameborder="0" srcdoc="" data-google-container-id="1" style="border: 0px; vertical-align: bottom;" data-load-complete="true"></iframe>
</div>
</div>
Как вообще можно с этим побороться?