MediaWiki:Common.js: відмінності між версіями

Матеріал з WikiLegalAid
Немає опису редагування
Мітка: Ручний відкіт
мНемає опису редагування
Рядок 69: Рядок 69:
         document.getElementById("consent-banner").style.display = "none";
         document.getElementById("consent-banner").style.display = "none";
     }
     }
});
mw.loader.using('mediawiki.util').then(function () {
  var ad = document.createElement('div');
  ad.setAttribute('align', 'center');
  ad.innerHTML = `
    <script async src="https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js?client=ca-pub-1234567890123456" crossorigin="anonymous"></script>
    <ins class="adsbygoogle"
        style="display:inline-block;width:728px;height:90px"
        data-ad-client="ca-pub-9946719691242357"
        data-ad-slot="1234567890"></ins>
    <script>(adsbygoogle = window.adsbygoogle || []).push({});</script>
  `;
  // Додаємо перед основним контентом
  var content = document.getElementById('content');
  if (content) {
    content.parentNode.insertBefore(ad, content);
  }
});
});