Hide yandex adv in fullscreen.

This commit is contained in:
Oleg Sh
2022-01-30 17:01:44 +02:00
parent 024644880f
commit bc282b4a58
2 changed files with 12 additions and 6 deletions

View File

@@ -585,17 +585,21 @@ function postLoadPage()
document.getElementById('Fullscreen').onclick = function()
{
var idList = ["h1Header", "h1Text", "navigation", "footerContent"];
var idList = ["h1Header", "h1Text", "navigation", "footerContent", "bottom_adv"];
fullscreen = !fullscreen
userAction(fullscreen ? "fullscreen_on" : "fullscreen_off");
for (var i = 0; i < idList.length; i++)
for (var i = 0; i < idList.length; i++) {
let element = document.getElementById(idList[i]);
if (!element) continue;
if (fullscreen)
document.getElementById(idList[i]).style.display = "none";
element.style.display = "none";
else
document.getElementById(idList[i]).style.display = "block";
element.style.display = "block";
}
document.getElementById("mainContainer").className = fullscreen ? "container-fluid page-wrap" : "container page-wrap";

View File

@@ -183,10 +183,11 @@
<?php elseif (L('current_language') == "ru"): ?>
<section id="bottom_adv">
<section style="height:50px;text-align: center;" id="bottom_info" class="hidden-phone">
<!-- Yandex.RTB R-A-202319-2 -->
<div id="yandex_rtb_R-A-202319-2"></div>
<div id="yandex_rtb_R-A-202319-2"></div>
<script>window.yaContextCb.push(()=>{
Ya.Context.AdvManager.render({
renderTo: 'yandex_rtb_R-A-202319-2',
@@ -194,6 +195,7 @@
})
})</script>
</section>
</section>
<!--
<section style="height:32px;text-align: center;" id="bottom_info" class="hidden-phone">