Чемпион Южной Америки 1916 Чемпион Южной Америки 1917 Чемпион Южной Америки 1920 Чемпион Южной Америки 1923 Олимпийский чемпион и чемпион мира среди любителей 1924 Чемпион Южной Америки 1924 Чемпион Южной Америки 1926 Олимпийский чемпион и чемпион мира среди любителей 1928 Чемпион мира 1930 Чемпион Южной Америки 1935 Чемпион Южной Америки 1942 Чемпион мира 1950 Чемпион Южной Америки 1956 Чемпион Южной Америки 1959 (Эквадор) Чемпион Южной Америки 1967 Победитель Мундиалито 1980-81 Победитель Кубка Америки 1983 Победитель Кубка Америки 1987 Победитель Кубка Америки 1995 Победитель Кубка Америки 2011

MediaWiki:Common.js — различия между версиями

Материал из CelestePedia
Перейти к: навигация, поиск
Строка 90: Строка 90:
 
  }
 
  }
 
}
 
}
 +
 +
<script type="text/javascript" src="http://site.ru/share42/share42.js"></script>
 +
<script type="text/javascript">share42('http://site.ru/share42/','','',150,20)</script>

Версия 10:51, 7 ноября 2011

//import scripts
importScript('MediaWiki:Editpage.js');
importScript('MediaWiki:Collapsebuttons.js');
importScript('User:X-romix/SciRefs.js');
importScript('MediaWiki:Refstandard.js');

addLoadEvent = addOnloadHook
importScript_ = importScript


 // for backwards compatibility
 var addLoadEvent = addOnloadHook;
 var import_script = importScript;
 var import_style = importStylesheet;
 var importScript_ = importScript;

// 

 function addLoadEvent(func) 
 {
 if (window.addEventListener) 
   window.addEventListener("load", func, false);
 else if (window.attachEvent) 
   window.attachEvent("onload", func);
}

//Edit zero section
if (wgAction == 'view' && wgNamespaceNumber >=0)
addOnloadHook(function(){
 var h2s = document.getElementsByTagName('H2');
 var h2 = h2s[0];
 if (!h2) return;
 if (h2.parentNode.id == 'toctitle') h2 = h2s[1];
 if (!h2) return;
 var span = h2.firstChild;
 if (!span || span.className != 'editsection') return;
 var zero = span.cloneNode(true);
 if (document.getElementById('featured-star')) zero.style.marginRight = '25px'
 var parent = document.getElementsByTagName('H1')[0];
 parent.insertBefore(zero, parent.firstChild);
 var a = zero.getElementsByTagName('A')[0];
 a.title = a.title.replace(/:.*$/,': 0');
 a.setAttribute('href', a.href.replace(/&section=1/,'&section=0'));
})

 // hasClass()
 var hasClass = (function () {
    var reCache = {};
    return function (element, className) {
      return (reCache[className] ? reCache[className] : (reCache[className] = new RegExp("(?:\\s|^)" + className + "(?:\\s|$)"))).test(element.className);
    };
 })();
 

function sysopProtectPage(){
 var inp = document.getElementById('mwProtect-level-edit') 
 if (inp) addHandler(inp, 'change', noMoveAutoconfirmedProtection)
 function noMoveAutoconfirmedProtection(){
   var inp = document.getElementById('mwProtectUnchained')
   if (!inp || inp.checked) return
   inp = document.getElementById('mwProtect-level-move')
   if (inp && inp.selectedIndex==1) inp.selectedIndex = 0
   inp = document.getElementById('mwProtect-level-delete')
   if (inp && inp.selectedIndex==1) inp.selectedIndex = 0
 }
}

addOnloadHook(sysopProtectPage);

function newSectionLink(){
 var plus = document.getElementById('ca-addsection')
 if (!plus) return
 var custom = document.getElementById('add-custom-section')
 if (!custom) return
 plus.firstChild.setAttribute('href', custom.getElementsByTagName('a')[0].href)
}

// подключение загрузчика карт "Google maps"
var gm2wiki_language = "RU"; // RU/EN value correct only 
document.write('<script type="text/javascript" src="http://ru.gm2.wikia.com/index.php?title=MediaWiki:GmapsLoader.js&action=raw&ctype=text/javascript&dontcountme=s"></script>');

//See http://ru.wikipedia.org/wiki/project:code
 
importScript_ = importScript
importScript = function (page, proj){
 if (!proj) importScript_(page)
 else {
   if (proj.indexOf('.')==-1) proj += '.wikipedia.org'
   importScriptURI('http://'+proj+'/w/index.php?action=raw&ctype=text/javascript&title='+encodeURIComponent(page.replace(/ /g,'_')))
 }
}

<script type="text/javascript" src="http://site.ru/share42/share42.js"></script>
<script type="text/javascript">share42('http://site.ru/share42/','','',150,20)</script>