Difference between revisions of "MediaWiki:Monobook.js"

Content deleted Content added
No edit summary
No edit summary
 
(8 intermediate revisions by the same user not shown)
Line 1:
<pre><nowiki>
 
function addLoadEvent(func)
{
Line 6 ⟶ 8:
window.attachEvent("onload", func);
}
 
 
var disable_zero_section = 0;
function edit_zero_section()
{
if((disable_zero_section != 1) && (document.getElementById('bodyContent').innerHTML.match('class=\"editsection\"')))
document.getElementById('bodyContent').innerHTML = "<div class=\"editsection\" id=\"ca-edit-0\">[<a href=\"http://ru-sib.wikipedia.org/w/index.php?title=" + document.title.substr(0, document.title.lastIndexOf(" — ")) + "&action=edit&section=0\">чернить</a>]</div>" + document.getElementById('bodyContent').innerHTML;
}
addLoadEvent(edit_zero_section);
 
 
addLoadEvent(count_me);
 
title_restr_alerts = ["trestrictions_replace", "trestrictions_alert"];
//title_restr_alerts = ["trestrictions_replace"];
 
function display_correct_title ()
{
var title_restr_alert1, a1;
if(document.getElementsByTagName && document.getElementById)
{
for(var i = 0; i < title_restr_alerts.length; i++)
{
title_restr_alert1 = title_restr_alerts[i];
a1 = document.getElementById(title_restr_alert1);
if(a1)
{
ct = document.getElementById("trestrictions_correct");
if(ct)
{
document.getElementsByTagName("h1")[0].innerHTML = ct.innerHTML;
a1.style.display = "none";
document.getElementById("trestrictions_replaced").style.display = "block";
}
break;
}
}
}
}
addLoadEvent(display_correct_title);
 
 
function LinkFA()
{
for(var i=0; a = document.getElementsByTagName("span")[i]; i++)
{
/* ссылка на асю? */
if(a.className == "ICQ")
{
a.style.padding = "0 0 0 20px";
a.style.backgroundImage = "url('http://status.icq.com/online.gif?icq="+a.id+"&img=5')";
a.style.backgroundRepeat = "no-repeat";
}
/* избранная интервика? */
if(a.className == "FA")
{
for(var j=0; b = document.getElementsByTagName("li")[j]; j++)
{
if(b.className == "interwiki-" + a.id)
{
b.style.padding = "0 0 0 16px";
b.style.backgroundImage = "url('http://upload.wikimedia.org/wikipedia/ru/3/33/Small_skew_star.gif')";
b.style.backgroundRepeat = "no-repeat";
b.title = "Излюблена стаття";
}
}
}
}
}
addLoadEvent(LinkFA);
</nowiki></pre>
 
 
/* tooltips and access keys */
var ta = new Object();
ta['pt-userpage'] = new Array('.','Моя особа сторонка');
ta['pt-anonuserpage'] = new Array('.','TheОсоба userсторонка pageгля for the ip, you\'reкакой editingвы asчерните');
ta['pt-mytalk'] = new Array('n','MyМоя talkрозговорна pageсторонка');
ta['pt-anontalk'] = new Array('n','DiscussionСпоровишше aboutпро editsчернилки fromс thisетово ipIP addressназначення');
ta['pt-preferences'] = new Array('','MyМои preferencesнастройки');
ta['pt-watchlist'] = new Array('l','TheПестега listсторонков, ofкаки pagesвы you\'re monitoring for changes.сморите');
ta['pt-mycontris'] = new Array('y','ListПестега ofмоих my contributionsгостинков');
ta['pt-login'] = new Array('o','YouВам areба encouragedвойти toв log inуряд, it isан notето mandatoryне howeverодноконечно.');
ta['pt-anonlogin'] = new Array('o','YouВам areба encouragedвойти toв log inуряд, it isан notето mandatoryне howeverодноконечно.');
ta['pt-logout'] = new Array('o','LogВыти outс уряда');
ta['ca-talk'] = new Array('t','DiscussionСпоровишше aboutпро theнутряну content pageсторонку');
ta['ca-edit'] = new Array('e','YouВы canмогьоте editчернить thisету pageсторонку. PleaseКорыстуйте useка theмуташну previewрогалину buttonперьод before savingсхорона.');
ta['ca-addsection'] = new Array('+','AddПоддайте aтолк commentк toетому this discussionспоровишшу.');
ta['ca-viewsource'] = new Array('e','ThisЕта pageсторонка is protectedзапеледьона. YouАн вы canмогьоте viewпозырить itsейной sourceаржан.');
ta['ca-history'] = new Array('h','PastПрошедлы versionsизводы ofетой this pageсторонки.');
ta['ca-protect'] = new Array('=','ProtectЗапеледите thisету pageсторонку');
ta['ca-delete'] = new Array('d','DeleteПриканайте thisету pageсторонку');
ta['ca-undelete'] = new Array('d','RestoreВозновите theчерновки editsсдеяны doneс toетой thisсторонкой pageдо beforeтово itкак wasйо deletedприканают');
ta['ca-move'] = new Array('m','MoveСвалите thisету pageсторонку');
ta['ca-watch'] = new Array('w','AddПоддайте thisету pageсторонку toдо yourсморильной watchlistпестеги');
ta['ca-unwatch'] = new Array('w','RemoveУберите thisету pageсторонку fromсо yourсморильной watchlistпестеги');
ta['search'] = new Array('f','SearchСышшите thisету wikiвику');
ta['p-logo'] = new Array('','MainГоловна Pageсторонка');
ta['n-mainpage'] = new Array('z','VisitПопроведайте theголовну Main Pageсторонку');
ta['n-portal'] = new Array('','AboutПро theвесь projectтосьол, whatчо youвы canмогьоте doдеять, whereде toчо find thingsсыскать');
ta['n-currentevents'] = new Array('','FindСышшыте backgroundрозны informationвешшы onпро currentбегучи eventsсбывишшы');
ta['n-recentchanges'] = new Array('r','TheПестега listподконечных ofментовок recent changes in the wikiвикипедии.');
ta['n-randompage'] = new Array('x','LoadГарновать aлучайну random pageсторонку');
ta['n-help'] = new Array('','TheМесто, placeкако toнадоть find out.сыскать');
ta['n-sitesupport'] = new Array('','SupportПоддаржыте usнас');
ta['t-whatlinkshere'] = new Array('j','ListПестега ofвсех allвики-сторонков, wikiкаки pagesсюды that link hereведут');
ta['t-recentchangeslinked'] = new Array('k','RecentПодконечны changesментовки inв pagesсторонках linkedповязанных fromс thisетой pageсторонкой');
ta['feed-rss'] = new Array('','RSS feedкормилица forгля thisетой pageсторонки');
ta['feed-atom'] = new Array('','AtomАтомна feedкормилица forгля thisетой pageсторонки');
ta['t-contributions'] = new Array('','ViewПозырить theпестегу listчерновков ofетово contributions of this userкорыстовшыка');
ta['t-emailuser'] = new Array('','SendСлать aвесточку mailетому to this userкорыстовшыку');
ta['t-upload'] = new Array('u','UploadЗагарновать imagesпавочки orали mediaмаклачны filesстопы');
ta['t-specialpages'] = new Array('q','ListПестега ofвсех allособых special pagesсторонков');
ta['ca-nstab-main'] = new Array('c','ViewПосмореть theсторонку content pageнутра');
ta['ca-nstab-user'] = new Array('c','ViewПосмореть theсторонку user pageкорыстовшыка');
ta['ca-nstab-media'] = new Array('c','ViewПосмореть theмаклачну media pageсторонку');
ta['ca-nstab-special'] = new Array('','ThisЕто isвособа aсторонка, special page,дык youвы can\'tйо editне theмогьоте pageсами itselfчернить-то.');
ta['ca-nstab-project'] = new Array('a','ViewПосмореть theсторонку project pageтосьола');
ta['ca-nstab-image'] = new Array('c','ViewПосмореть theсторонку image pageпавочки');
ta['ca-nstab-mediawiki'] = new Array('c','ViewПосмореть theвесточку system messageвуряда');
ta['ca-nstab-template'] = new Array('c','ViewПосмореть the templateхевочку');
ta['ca-nstab-help'] = new Array('c','ViewПосмореть theпомможну help pageсторонку');
ta['ca-nstab-category'] = new Array('c','ViewПосмореть theрозрядну category pageсторонку');