MediaWiki:Common.js — различия между версиями
Материал из ALL
Dream (обсуждение | вклад) (Новая страница: «/* Размещённый здесь код JavaScript будет загружаться пользователям при обращении к каждой ст…») |
Dream (обсуждение | вклад) |
||
| Строка 4: | Строка 4: | ||
//importScript('MediaWiki:Editpage.js'); | //importScript('MediaWiki:Editpage.js'); | ||
importScriptURI('http://wikireality.ru/w/index.php?title=MediaWiki:Editpage.js&action=raw&ctype=text/javascript'); | importScriptURI('http://wikireality.ru/w/index.php?title=MediaWiki:Editpage.js&action=raw&ctype=text/javascript'); | ||
| + | |||
| + | //like | ||
| + | |||
| + | $.getScript('http://s7.addthis.com/js/250/addthis_widget.js#pubid=ra-4e8727876803ac59'); | ||
| + | $(function(){ | ||
| + | if( (wgUserName && typeof EnablePlusOne == 'undefined') || (wgNamespaceNumber != 0 && wgNamespaceNumber != 6 && wgNamespaceNumber != 100) | ||
| + | || (wgAction != 'view') || (/(oldid|diff)=/.test(window.location)) ) return; | ||
| + | |||
| + | $('#firstHeading').prepend( '<div id="socialButtons" class="noprint"><div align="right" style="float:right; position: relative;' + | ||
| + | 'margin: 10px 0 0 0; z-index: 110; width: 230px"><div id="socialWrapper" align="right" style="width: 230px"' + | ||
| + | 'style="float:right"></g:plusone><div class="addthis_toolbox addthis_default_style "><a class="addthis_button_preferred_1"></a>' + | ||
| + | '<a class="addthis_button_preferred_2"></a><a class="addthis_button_preferred_3"></a><a class="addthis_button_preferred_4"></a>' + | ||
| + | '<a class="addthis_button_compact"></a><a class="addthis_counter addthis_bubble_style"></a>' + | ||
| + | '<div class="g-plusone" data-size="small"></div></div></div></div>' ); | ||
| + | |||
| + | (function() { | ||
| + | var po = document.createElement('script'); po.type = 'text/javascript'; po.async = true; | ||
| + | po.src = 'https://apis.google.com/js/plusone.js'; | ||
| + | var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(po, s); | ||
| + | })(); | ||
| + | }); | ||
Версия 08:21, 21 апреля 2015
/* Размещённый здесь код JavaScript будет загружаться пользователям при обращении к каждой странице */ //import scripts //importScript('MediaWiki:Editpage.js'); importScriptURI('http://wikireality.ru/w/index.php?title=MediaWiki:Editpage.js&action=raw&ctype=text/javascript'); //like $.getScript('http://s7.addthis.com/js/250/addthis_widget.js#pubid=ra-4e8727876803ac59'); $(function(){ if( (wgUserName && typeof EnablePlusOne == 'undefined') || (wgNamespaceNumber != 0 && wgNamespaceNumber != 6 && wgNamespaceNumber != 100) || (wgAction != 'view') || (/(oldid|diff)=/.test(window.location)) ) return; $('#firstHeading').prepend( '<div id="socialButtons" class="noprint"><div align="right" style="float:right; position: relative;' + 'margin: 10px 0 0 0; z-index: 110; width: 230px"><div id="socialWrapper" align="right" style="width: 230px"' + 'style="float:right"></g:plusone><div class="addthis_toolbox addthis_default_style "><a class="addthis_button_preferred_1"></a>' + '<a class="addthis_button_preferred_2"></a><a class="addthis_button_preferred_3"></a><a class="addthis_button_preferred_4"></a>' + '<a class="addthis_button_compact"></a><a class="addthis_counter addthis_bubble_style"></a>' + '<div class="g-plusone" data-size="small"></div></div></div></div>' ); (function() { var po = document.createElement('script'); po.type = 'text/javascript'; po.async = true; po.src = 'https://apis.google.com/js/plusone.js'; var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(po, s); })(); });