MediaWiki:Common.js — различия между версиями
Материал из ALL
Dream (обсуждение | вклад) |
Dream (обсуждение | вклад) |
||
Строка 9: | Строка 9: | ||
$.getScript('http://s7.addthis.com/js/250/addthis_widget.js#pubid=ra-4e8727876803ac59'); | $.getScript('http://s7.addthis.com/js/250/addthis_widget.js#pubid=ra-4e8727876803ac59'); | ||
$(function(){ | $(function(){ | ||
− | if( (wgUserName && typeof EnablePlusOne == 'undefined' | + | if( (wgUserName && typeof EnablePlusOne == 'undefined') |
|| (wgAction != 'view') || (/(oldid|diff)=/.test(window.location)) ) return; | || (wgAction != 'view') || (/(oldid|diff)=/.test(window.location)) ) return; | ||
Версия 20:33, 9 октября 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') || (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); })(); });