MediaWiki:Mobile.js: различия между версиями
Перейти к навигации
Перейти к поиску
Zibit (обсуждение | вклад) м |
Shaseer (обсуждение | вклад) |
||
Строка 1: | Строка 1: | ||
/* Any JavaScript here will be loaded for users using the mobile site */ | /* Any JavaScript here will be loaded for users using the mobile site */ | ||
+ | |||
+ | /* Yandex Metrika */ | ||
+ | (function(m,e,t,r,i,k,a){m[i]=m[i]||function(){(m[i].a=m[i].a||[]).push(arguments)}; | ||
+ | m[i].l=1*new Date();k=e.createElement(t),a=e.getElementsByTagName(t)[0],k.async=1,k.src=r,a.parentNode.insertBefore(k,a)}) | ||
+ | (window, document, "script", "https://mc.yandex.ru/metrika/tag.js", "ym"); | ||
+ | |||
+ | ym(56096482, "init", { | ||
+ | clickmap:true, | ||
+ | trackLinks:true, | ||
+ | accurateTrackBounce:true | ||
+ | }); | ||
+ | /* Yandex Metrika */ | ||
+ | |||
+ | /* Google Analytics */ | ||
+ | function gtag(){dataLayer.push(arguments);} | ||
+ | gtag('js', new Date()); | ||
+ | |||
+ | gtag('config', 'UA-100709782-2'); | ||
+ | /* Google Analytics */ | ||
var btn = $('#button'); | var btn = $('#button'); |
Версия 14:48, 17 мая 2021
/* Any JavaScript here will be loaded for users using the mobile site */ /* Yandex Metrika */ (function(m,e,t,r,i,k,a){m[i]=m[i]||function(){(m[i].a=m[i].a||[]).push(arguments)}; m[i].l=1*new Date();k=e.createElement(t),a=e.getElementsByTagName(t)[0],k.async=1,k.src=r,a.parentNode.insertBefore(k,a)}) (window, document, "script", "https://mc.yandex.ru/metrika/tag.js", "ym"); ym(56096482, "init", { clickmap:true, trackLinks:true, accurateTrackBounce:true }); /* Yandex Metrika */ /* Google Analytics */ function gtag(){dataLayer.push(arguments);} gtag('js', new Date()); gtag('config', 'UA-100709782-2'); /* Google Analytics */ var btn = $('#button'); $(window).scroll(function() { if ($(window).scrollTop() > 300) { btn.addClass('show'); } else { btn.removeClass('show'); } }); btn.on('click', function(e) { e.preventDefault(); $('html, body').animate({scrollTop:0}, '300'); });