「MediaWiki:Common.js」の版間の差分

編集の要約なし
1行目: 1行目:
 
(function(window, document) {
 
(function(window, document) {
        var ad = document.createElement('script');
+
    var ad = document.createElement('script');
        ad.type = 'text/javascript';
+
    ad.type = 'text/javascript';
        ad.dataset.adClient = 'ca-pub-6884347898813638';
+
    ad.dataset.adClient = 'ca-pub-6884347898813638';
        ad.async = true;
+
    ad.async = true;
        ad.src = 'https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js';
+
    ad.src = 'https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js';
        var sc = document.getElementsByTagName('script')[0];
+
    var sc = document.getElementsByTagName('script')[0];
        sc.parentNode.insertBefore(ad, sc);
+
    sc.parentNode.insertBefore(ad, sc);
        console.log(ad);
+
    console.log(ad);
 
})(window, document);
 
})(window, document);