MediaWiki:Common.js — различия между версиями
Материал из ANT-Inform documentation
Hubbitus (обсуждение | вклад) |
Hubbitus (обсуждение | вклад) (Add Google Alalytics code) |
||
| Строка 14: | Строка 14: | ||
}); | }); | ||
*/ | */ | ||
| + | |||
| + | |||
| + | <script type="text/javascript"> | ||
| + | var _gaq = _gaq || []; | ||
| + | _gaq.push(['_setAccount', 'UA-38366739-1']); | ||
| + | _gaq.push(['_trackPageview']); | ||
| + | |||
| + | (function() { | ||
| + | var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true; | ||
| + | ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js'; | ||
| + | var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s); | ||
| + | })(); | ||
| + | </script> | ||
Версия 11:36, 9 февраля 2013
/* Размещённый здесь код JavaScript будет загружаться пользователям при обращении к каждой странице */
/* http://en.wikipedia.org/wiki/User:Js/ajaxPreview
importScript('User:Js/ajaxPreview.js'); // [[user:js/ajaxPreview]]
*/
/* http://en.wikipedia.org/wiki/Wikipedia:WikiProject_User_scripts/Scripts/External_editor
addOnloadHook(function() {
var editTab = document.getElementById("ca-edit");
if (!editTab) return;
var editURL = editTab.getElementsByTagName("a")[0].href;
addPortletLink("p-cactions", editURL + "&externaledit=true", "EE", "ca-exted", "External editor", "");
});
*/
<script type="text/javascript">
var _gaq = _gaq || [];
_gaq.push(['_setAccount', 'UA-38366739-1']);
_gaq.push(['_trackPageview']);
(function() {
var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
})();
</script>