|
|
| Рядок 1: |
Рядок 1: |
| /* Розміщений тут код JavaScript буде завантажений всім користувачам при зверненні до будь-якої сторінки */ | | /* Розміщений тут код JavaScript буде завантажений всім користувачам при зверненні до будь-якої сторінки */ |
| mw.loader.using('mediawiki.util').then(function () {
| |
|
| |
| var adContainer = document.createElement('div');
| |
| adContainer.setAttribute('align', 'center');
| |
| var adIns = document.createElement('ins');
| |
| adIns.className = 'adsbygoogle';
| |
| adIns.style.cssText = 'display:inline-block;width:728px;height:90px';
| |
| adIns.setAttribute('data-ad-client', 'ca-pub-9946719691242357');
| |
| adContainer.appendChild(adIns);
| |
|
| |
| var adScript1 = document.createElement('script');
| |
| adScript1.async = true;
| |
| adScript1.src = 'https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js?client=ca-pub-9946719691242357';
| |
| adScript1.crossOrigin = 'anonymous';
| |
|
| |
| var adScript2 = document.createElement('script');
| |
| adScript2.text = '(adsbygoogle = window.adsbygoogle || []).push({});';
| |
|
| |
| var content = document.getElementById('content');
| |
| if (content) {
| |
| content.parentNode.insertBefore(adScript1, content);
| |
| content.parentNode.insertBefore(adContainer, content);
| |
| content.parentNode.insertBefore(adScript2, content);
| |
| }
| |
| });
| |
|
| |
|
| |
|
| |
|
| |
|
| mw.loader.using('mediawiki.util').then(function () { | | mw.loader.using('mediawiki.util').then(function () { |