MediaWiki:Common.js — различия между версиями
Материал из ANT-Inform documentation
Hubbitus (обсуждение | вклад) (Test) |
Hubbitus (обсуждение | вклад) (importScript('MediaWiki:Collapsebuttons.js') always to see changes in edit preview also) |
||
| (не показано 12 промежуточных версий этого же участника) | |||
| Строка 1: | Строка 1: | ||
/* Размещённый здесь код JavaScript будет загружаться пользователям при обращении к каждой странице */ | /* Размещённый здесь код JavaScript будет загружаться пользователям при обращении к каждой странице */ | ||
| − | /* http://en.wikipedia.org/wiki/User:Js/ajaxPreview | + | /* 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", ""); | ||
| + | }); | ||
| + | */ | ||
| + | |||
| + | /* Statistics */ | ||
| + | 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); | ||
| + | })(); | ||
| + | |||
| + | /* | ||
| + | Copy of http://wiki.ru.grepolis.com/wiki/MediaWiki:Common.js to allow work Шаблон:спойлер | ||
| + | */ | ||
| + | /* if(wgAction == 'view' || wgAction == 'submit') { */ | ||
| + | importScript('MediaWiki:Collapsebuttons.js'); | ||
| + | /*}*/ | ||
Текущая версия на 13:04, 23 декабря 2014
/* Размещённый здесь код 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", ""); }); */ /* Statistics */ 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); })(); /* Copy of http://wiki.ru.grepolis.com/wiki/MediaWiki:Common.js to allow work Шаблон:спойлер */ /* if(wgAction == 'view' || wgAction == 'submit') { */ importScript('MediaWiki:Collapsebuttons.js'); /*}*/