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

Tartalom törölve Tartalom hozzáadva
Dubaduba (vitalap | szerkesztései)
Dubaduba (vitalap | szerkesztései)
aNincs szerkesztési összefoglaló
1. sor:
/*
==MediaWiki tooltips and access keys==
<pre>
*/
 
/* </pre>
76 ⟶ 77 sor:
ta['ca-nstab-help'] = new Array('c','View the help page');
ta['ca-nstab-category'] = new Array('c','View the category page');
 
/* </pre>
==Javascript for the user toolbar==
<pre> */
 
* 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';
 
}
 
/* </pre>
 
==addLoadEvent==
<pre> */
199 ⟶ 105 sor:
// set up the words in your language
var NavigationBarHide = '[elreHide]';
var NavigationBarShow = '[mutaShow]';
// set up max count of Navigation Bars on page,