Шаблон:Ads post — различия между версиями

Материал из Enduro.team
Перейти к: навигация, поиск
м
м
 
(не показано 13 промежуточных версий этого же участника)
Строка 2: Строка 2:
 
<html>
 
<html>
 
<body>
 
<body>
<div class="adbanner" style="z-index: 10011; margin-top: +50px; width: 100%;">
+
<div class="postadbanner" id="postadbanner" style="width: 90%;">
<ins class="adsbygoogle"
+
<script>
    style="display:block; text-align:center;"
+
if (window.matchMedia) {
    data-ad-layout="in-article"
+
  if(window.matchMedia('(prefers-color-scheme: dark)').matches){
    data-ad-format="fluid"
+
    var d1 = document.getElementById('postadbanner');
    data-ad-client="ca-pub-9226951475373251"
+
    d1.insertAdjacentHTML('beforeend', '<ins class="adsbygoogle" style="display:block; text-align:center;" data-ad-format="fluid" data-ad-client="ca-pub-9226951475373251" data-ad-slot="7972256841"></ins>');
    data-ad-slot="6447563123"></ins>
+
  } else {
 +
    var d1 = document.getElementById('postadbanner');
 +
    d1.insertAdjacentHTML('beforeend', '<ins class="adsbygoogle" style="display:block; text-align:center;" data-ad-format="fluid" data-ad-client="ca-pub-9226951475373251" data-ad-slot="6447563123"></ins>');
 +
  }
 +
} else {
 +
    var d1 = document.getElementById('postadbanner');
 +
    d1.insertAdjacentHTML('beforeend', '<ins class="adsbygoogle" style="display:block; text-align:center;" data-ad-format="fluid" data-ad-client="ca-pub-9226951475373251" data-ad-slot="6447563123"></ins>');
 +
}
 +
</script>
 
<script>
 
<script>
 
     (adsbygoogle = window.adsbygoogle || []).push({});
 
     (adsbygoogle = window.adsbygoogle || []).push({});

Текущая версия на 16:16, 16 августа 2022