Открыть главное меню

  • Править

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

Версия 13:57, 5 апреля 2021 (просмотреть исходный код)
Alexander (обсуждение | вклад)
м
(Метки: правка с мобильного устройства, правка из мобильной версии)
← Предыдущая правка
Текущая версия на 15:16, 16 августа 2022 (просмотреть исходный код)
Alexander (обсуждение | вклад)
м
 
(не показано 27 промежуточных версий этого же участника)
Строка 2: Строка 2:
 
<html>
 
<html>
 
<body>
 
<body>
−
<div class="adbanner" style="position:relative; z-index: 10011; min-height: 200px;">
+
<div class="postadbanner" id="postadbanner" style="width: 90%;">
−
<ins class="adsbygoogle"
 
−
    style="display:block; text-align:center;"
 
−
    data-ad-layout="in-article"
 
−
    data-ad-format="fluid"
 
−
    data-ad-client="ca-pub-9226951475373251"
 
−
    data-ad-slot="6447563123"></ins>
 
 
<script>
 
<script>
−
    (adsbygoogle = window.adsbygoogle || []).push({});
+
if (window.matchMedia) {
 +
  if(window.matchMedia('(prefers-color-scheme: dark)').matches){
 +
    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="7972256841"></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>
−
</div>
 
−
</body>
 
−
</html>
 
−
</center>
 
−
<center>
 
−
<html>
 
−
<body>
 
−
<div class="adbanner" style="opacity: 0.001; position:relative; z-index: 10000; margin-top: -400px; min-height: 400px; height: 400px;">
 
−
<ins class="adsbygoogle"
 
−
    style="display:block; text-align:center;"
 
−
    data-ad-layout="in-article"
 
−
    data-ad-format="fluid"
 
−
    data-ad-client="ca-pub-9226951475373251"
 
−
    data-ad-slot="6447563123"></ins>
 
 
<script>
 
<script>
 
     (adsbygoogle = window.adsbygoogle || []).push({});
 
     (adsbygoogle = window.adsbygoogle || []).push({});

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