Difference between revisions of "Template:Ads post2"
m |
m |
||
Line 2: | Line 2: | ||
<html> | <html> | ||
<body> | <body> | ||
− | < | + | <script> |
− | <ins class="adsbygoogle" | + | 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> | ||
+ | <div class="postadbanner" id="postadbanner""> | ||
<script> | <script> | ||
(adsbygoogle = window.adsbygoogle || []).push({}); | (adsbygoogle = window.adsbygoogle || []).push({}); |
Revision as of 15:53, 22 July 2021