„MediaWiki:Monobook.js” változatai közötti eltérés

Tartalom törölve Tartalom hozzáadva
Dubaduba (vitalap | szerkesztései)
aNincs szerkesztési összefoglaló
Dubaduba (vitalap | szerkesztései)
aNincs szerkesztési összefoglaló
1. sor:
/*
<pre>
*/
/* tooltips and access keys */
 
ta['pt-userpage'] = new Array('','My user page');
ta['pt-anonuserpage'] = new Array('','The user page for the ip you\'re editing as');
ta['pt-mytalk'] = new Array('','My talk page');
ta['pt-anontalk'] = new Array('','Discussion about edits from this ip address');
ta['pt-preferences'] = new Array('','My preferences');
ta['pt-watchlist'] = new Array('','The list of pages you\'re monitoring for changes.');
ta['pt-mycontris'] = new Array('','List of my contributions');
ta['pt-login'] = new Array('','Logging in is not required, but brings many benefits.');
ta['pt-anonlogin'] = new Array('','Logging in is not required, but brings many benefits.');
ta['pt-logout'] = new Array('','Log out');
ta['ca-talk'] = new Array('','Discussion about the content page');
ta['ca-edit'] = new Array('','You can edit this page. Please use the preview button before saving.');
ta['ca-addsection'] = new Array('','Start a new discussion');
ta['ca-viewsource'] = new Array('','This page is protected. You can view its source.');
ta['ca-history'] = new Array('','Past versions of this page.');
ta['ca-protect'] = new Array('','Protect this page');
ta['ca-unprotect'] = new Array('','Unprotect this page');
ta['ca-delete'] = new Array('','Delete this page');
ta['ca-undelete'] = new Array('','Restore the edits done to this page before it was deleted');
ta['ca-move'] = new Array('','Move this page');
ta['ca-nomove'] = new Array('','You don\'t have the permissions to move this page');
ta['ca-watch'] = new Array('','Add this page to your watchlist');
ta['ca-unwatch'] = new Array('','Remove this page from your watchlist');
ta['search'] = new Array('','Search Wikipedia');
ta['p-logo'] = new Array('','Main Page');
ta['n-mainpage'] = new Array('','Visit the Main Page');
ta['n-portal'] = new Array('','About the project, what you can do, where to find things');
ta['n-Featured-articles'] = new Array('','Featured articles - the best of Wikipedia');
ta['n-currentevents'] = new Array('','Find background information on current events');
ta['n-recentchanges'] = new Array('','List of recent changes in Wikipedia');
ta['n-randompage'] = new Array('','Load a random page');
ta['n-help'] = new Array('','The place to find out about Wikipedia');
ta['n-contact'] = new Array('','How to contact Wikipedia');
ta['n-sitesupport'] = new Array('','Support us');
ta['t-whatlinkshere'] = new Array('','List of all wiki pages that link here');
ta['t-recentchangeslinked'] = new Array('','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('','Upload images or media files');
ta['t-specialpages'] = new Array('','List of all special pages');
ta['t-print'] = new Array('','Printable version of this page');
ta['t-permalink'] = new Array('','Permanent link to this version of the page');
ta['t-cite'] = new Array('','Cite this Wikipedia article');
ta['ca-nstab-main'] = new Array('','View the content page');
ta['ca-nstab-user'] = new Array('','View the user page');
ta['ca-nstab-media'] = new Array('','View the media page');
ta['ca-article'] = new Array('','This is a special page; you can\'t edit the page itself.');
ta['ca-nstab-project'] = new Array('','View the project page');
ta['ca-nstab-image'] = new Array('','View the image page');
ta['ca-nstab-mediawiki'] = new Array('','View the system message');
ta['ca-nstab-template'] = new Array('','View the template');
ta['ca-nstab-help'] = new Array('','View the help page');
ta['ca-nstab-category'] = new Array('','View the category page');
 
 
/* Javascript for the user toolbar
* Author: Niklas Laxström [[w:fi:user:Nikerabbit]]
* License: Public domain
* Version: 1 (firefox fix)
* Version: 2 Should work on most of the browsers
*/
 
/* Globals */
 
var toolbar_sc = 'fiwiki-bottom-toolbar-sc';
var toolbar_f = 'fiwiki-bottom-toolbar-f';
var special_char = 'fiwiki-special-character';
var feature = 'fiwiki-feature';
 
var clientPC = navigator.userAgent.toLowerCase(); // Get client info
var is_ie = ((clientPC.indexOf('msie')!=-1) && (clientPC.indexOf('opera')==-1));
 
function initializebuttons() {
if (window.addEventListener) window.addEventListener("load",buttons,false);
else if (window.attachEvent) window.attachEvent("onload",buttons);
}
 
function addSpecialCharacter(f1, ftitle) {
k = document.getElementById(toolbar_sc);
if ( k ) {
if ( !is_ie ) {
mySpan = document.createElement('span');
myText = document.createTextNode(f1);
mySpan.appendChild(myText);
 
myOnClick = document.createAttribute('onclick');
myOnClick.nodeValue = "insertTags('" + f1 + "', '', '')";
mySpan.setAttributeNode(myOnClick);
 
myClass = document.createAttribute('class');
myClass.nodeValue = special_char;
mySpan.setAttributeNode(myClass);
 
myTitle = document.createAttribute('title');
myTitle.nodeValue = ftitle;
mySpan.setAttributeNode(myTitle);
 
// Some spacing
k.appendChild(document.createTextNode(' '));
k.appendChild(mySpan);
 
} else {
// The nonstandard way
k.innerHTML += " <span onClick=\"javascript:insertTags('" + f1 + "','','');\" class=\"" + special_char + "\" title=\"" + ftitle + "\" >" + f1 + "</span>";
}
}
}
 
function addFeatureButton(f1, f2, f3, ftext, ftitle) {
k = document.getElementById(toolbar_f);
if ( k ) {
if ( !is_ie ) {
mySpan = document.createElement('span');
myText = document.createTextNode(ftext);
mySpan.appendChild(myText);
 
myOnClick = document.createAttribute('onclick');
myOnClick.nodeValue = "insertTags('" + f1 + "','" + f2 + "','" + f3 + "')";
mySpan.setAttributeNode(myOnClick);
 
mySpan.title = ftitle;
 
myClass = document.createAttribute('class');
myClass.nodeValue = feature;
mySpan.setAttributeNode(myClass);
 
// Some spacing
k.appendChild(document.createTextNode(' '));
k.appendChild(mySpan);
 
} else {
// The nonstandard way
k.innerHTML += " <span onClick=\"javascript:insertTags('" + f1 + "','" + f2 + "','" + f3 + "');\" class=\"" + feature + "\" title=\"" + ftitle + "\" >" + ftext + "</span>";
}
}
}
 
/* END */
function toggleTemplateTable() {
 
document.getElementById('fiwiki-templatetable').style.display=(document.getElementById('fiwiki-templatetable').style.display == 'none') ? 'block' : 'none';
 
document.getElementById('fiwiki-templatetoggle').innerHTML=(document.getElementById('fiwiki-templatetable').style.display == 'none') ? '&#9660; Sablonok' : '&#9650; Bezár';
 
}
/*
==MediaWiki tooltips and access keys==