// ezeket a sorokat wikEd telepítése során 
 // kell beilleszteni a saját_userlap/monobook.js oldalra
 //
 // ] fordítás az eredetileg angol ]-hez
 document.write('<script type="text/javascript" src="'
 + 'http://en.wikipedia.org/w/index.php?title=User:Cs%C3%B6rf%C3%B6ly_D/wikEd-hu.js'
 + '&action=raw&ctype=text/javascript&dontcountme=s"></script>');
 //
 // a ] "szövegszerkesztő-a-böngészőben" telepítése
 document.write('<script type="text/javascript" src="'
 + 'http://en.wikipedia.org/w/index.php?title=User:Cacycle/wikEd.js'
 + '&action=raw&ctype=text/javascript&dontcountme=s"></script>');
function assess(templateName) {
  var quality = prompt('Minőség:');
  if(quality == null) return false;
  var importance = prompt('Fontosság:');
  if(importance == null) return false;
 
  var today = new Date();
  var dateString = 
    today.getFullYear() + "-" + 
    (today.getMonth() + 1) + "-" +
    today.getDate();
  var template = 
    "{{" + templateName + 
    "|besorolás=" + quality + 
    "|fontosság=" + importance + 
    "|felhasználó=" + wgUserName + 
    "|dátum=" + dateString + 
    "}}";
 
  if (typeof(wikEdUseWikEd) != 'undefined') {
    if (wikEdUseWikEd == true) {
      WikEdUpdateTextarea();
    }
  }
  var textarea = document.editform.wpTextbox1;
 
  if(textarea.value.match("{{" + templateName ))
    textarea.value = textarea.value.replace(new RegExp("\\{\\{" + templateName + ".*?\\}\\}"), template);
  else
    textarea.value = template + '\n' + textarea.value;
 
  if (typeof(wikEdUseWikEd) != 'undefined') {
    if (wikEdUseWikEd == true) {
      WikEdUpdateFrame();
    }
  }
 
  var summary = document.editform.wpSummary;
  summary.value = "cikk értékelése";
 
  return false;
}
 
function addAssessButton(templateName, image, tip) {
  // FIXME néha eltünteti a többi gombot (wikEd miatt?)
  var toolbar = document.getElementById('toolbar');
  if (!toolbar) { return false; }
 
  mwInsertEditButton(toolbar, {
    "imageId": "editbutton-assess-" + templateName,
    "imageFile": image,
    "speedTip": tip,
    "tagOpen": "",
    "tagClose": "",
    "sampleText": ""
  });
  var button = document.getElementById("editbutton-assess-" + templateName);
  button.onclick = function() {assess(templateName);};
}
 
$(function() {
  addAssessButton("WPPSZI", "http://upload.wikimedia.org/wikipedia/commons/5/5b/Button_check.png", "Cikkértékelés");
}); //cikkértékelés-end

document.write('<script type="text/javascript" src="'
 + 'http://en.wikipedia.org/w/index.php?title=User:Lupin/popups.js' 
 + '&action=raw&ctype=text/javascript&dontcountme=s"></script>');

document.write('<script type="text/javascript" src="'
 + 'http://hu.wikipedia.org/w/index.php?title=User:Bdamokos/strings-hu.js' 
 + '&action=raw&ctype=text/javascript&dontcountme=s"></script>');

// -*- mode:java; coding:utf-8 -*-
 
// <nowiki>
 
//  Generates the box element containing the spec chars.
function createCustomBar() {
  var boxDiv = document.createElement('div');
  boxDiv.setAttribute('id', 'customBar');
  boxDiv.setAttribute('style', 'margin-bottom:2px;border:1px solid #aaaaaa;padding:3px');
  boxDiv.innerHTML =
    '<a href="http://hu.wikipedia.orghttps://wiki95.com/hu/Wikipédia:Különleges_karakterek" title="Wikipédia:Különleges karakterek">' +
    'Különleges karakterek</a>: ' +
    "<a href=\"javascript:insertTags('|','','')\">|</a> · " +
    "<a href=\"javascript:insertTags('„','”','')\">„”</a> · " +
    "<a href=\"javascript:insertTags('€','','')\">€</a> · " +
    "<a href=\"javascript:insertTags('°','','')\">°</a> · " +
    "<a href=\"javascript:insertTags('–','','')\">–</a> · " +
    "<a href=\"javascript:insertTags('²','','')\">²</a> " +
    "<a href=\"javascript:insertTags('³','','')\">³</a> " +
    "<a href=\"javascript:insertTags('½','','')\">½</a> · " +
    "<a href=\"javascript:insertTags('±','','')\">±</a> · " +
    "<a href=\"javascript:insertTags('†','','')\">†</a> · " +
    "<a href=\"javascript:insertTags('→','','')\">→</a> · " +
    "<a href=\"javascript:insertTags('<br>','','')\">&lt;br&gt;</a> · " +
    "<a href=\"javascript:insertTags('%7B%7Blektor%7D%7D','','')\"><small>lektor</small></a> · " +
    "<a href=\"javascript:insertTags('%7B%7Bforma%7D%7D','','')\"><small>forma</small></a> · " +
    "<a href=\"javascript:insertTags('%7B%7Bcsonk%7D%7D','','')\"><small>csonk</small></a> · " +
    "<a href=\"javascript:insertTags('%7B%7Bszubcsonk|~~~~~%7D%7D','','')\"><small>szubcsonk</small></a> · " +
    "<a href=\"javascript:insertTags('%7B%7BKözkincs%7D%7D','','')\"><small>közkincs</small></a> · " +
    "<a href=\"javascript:insertTags('%7B%7BKözkincs-régi%7D%7D','','')\"><small>régi</small></a> · " +
    "<a href=\"javascript:insertTags('%7B%7Btörlés%7D%7D','','')\"><small>törlés</small></a> · " +
    "<a href=\"javascript:insertTags('%7B%7Bazonnali|%7D%7D','','')\"><small>azonnali</small></a> · " +
    "<a href=\"javascript:insertTags('%7B%7Bjogsértő|url=%7D%7D','','')\"><small>jogsértő</small></a> · " +
    "<a href=\"javascript:insertTags('%7B%7Bnincslicenc%7D%7D','','')\"><small>nincslicenc</small></a> · " +
    "<a href=\"javascript:insertTags('%7B%7Benwiki|%7D%7D','','')\"><small>enwiki</small></a> · " +
    "<a href=\"javascript:insertTags('%5B%5BKategória:%5D%5D','','')\"><small>kategória</small></a> · " +
    "<a href=\"javascript:fixLatin1Chars()\"><small>kalapos</small></a> · " +
    "<a href=\"javascript:fixHungarianQuotes()\"><small>idézőjel</small></a> · " +
    "<a href=\"javascript:translateDatesEnHu()\"><small>dátum</small></a> · " +
    "<a href=\"javascript:orszagEnHu()\"><small>ország</small></a> · "+
    "<a href=\"javascript:customReplaceForm()\"><small>egyedi</small></a> · " +
    "<a href=\"javascript:insertTags('<i>','</i>','')\">&lt;i&gt;</a> " +
    "<a href=\"javascript:insertTags('<b>','</b>','')\">&lt;b&gt;</a> " +
    "<a href=\"javascript:insertTags('<s>','</s>','')\">&lt;s&gt;</a> · " +
    "<a href=\"javascript:insertTags('~~~~','','')\">~~~~</a> · " +
    "<a href=\"javascript:insertTags('%7B%7Baláíratlan|%7D%7D','','')\"><small>aláíratlan</small></a> · " +
    "<a href=\"javascript:insertTags('%7B%7Bsubst:törlés_teteje%7D%7D','','')\"><small>t-fej</small></a> · " +
    "<a href=\"javascript:insertTags('%7B%7Bsubst:törlés_alja%7D%7D','','')\"><small>t-láb</small></a> · " +
    "<a href=\"javascript:insertTags('%7B%7Bsubst:welcome|user=~~~~%7D%7D','','')\"><small>welcome</small></a> · " +
    "<a href=\"javascript:insertTags('%7B%7Bsubst:Üdvözlet|user=~~~~%7D%7D','','')\"><small>üdvölet</small></a> · " +
    "<a href=\"javascript:insertTags('%7B%7Bsubst:Anonüdv%7D%7D','','')\"><small>anonüdv</small></a>";  
return boxDiv;
}
 
function replaceRegexp(replaceWhat, replaceWith, modifiers) 
{
	if (modifiers == null) modifiers = "";
	var pattern = new RegExp(replaceWhat, modifiers);
	var obj_ta = document.editform.wpTextbox1;
	obj_ta.value = obj_ta.value.replace(pattern, replaceWith);
}
 
// Replaces Latin 1 chars with properly encoded Hungarian Latin 2 equivalents
function fixLatin1Chars() {	
  replaceRegexp("Õ", "Ő", "g");
  replaceRegexp("Û", "Ű", "g");
  replaceRegexp("õ", "ő", "g");
  replaceRegexp("û", "ű", "g");
  replaceRegexp("&#337;", "ő", "g");
  replaceRegexp("&#369;", "ű", "g");
}
 
// Replaces English style "" quotes with Hungarian „”
function fixHungarianQuotes() {
  replaceRegexp("\"(*)\"", "„$1”", "mg");
}
 
// Translate dates from English format to Hungarian
// Currently it only handles linkified dates
function translateDatesEnHu() {
  var months = [
		,
		,
		,
		,
		,
		,
		,
		,	
		,
		,
		,
		
		];
 
  for (var i = 0; i < months.length; i++) {
    var enMonth = months;
    var huMonth = months;
    // alert("Replacing " + enMonths + " with " + huMonth);
    // $1 = "15", $2 = "2005"
    replaceRegexp("\\\\],?\\s*\\\\]", "]. ].", "gm");
  }
}
 
// Replace all occurences of a user-entered regexp with a user entered replacement
function customReplaceForm() {
  var form =
    'Cseréld ezt a reguláris kifejezést: <input id="customReplaceThis" type="text" size="40"> ' +
    'erre: <input id="customReplaceWith" type="text" size="40"> ' +
    '<input id="customReplaceCS" type="checkbox"> méretérzékeny <b>::</b> ' +
    '<a href="javascript:performCustomReplace()">csere</a>';
  insertCustomForm(form);
  document.getElementById('customReplaceThis').focus();
}
 
function performCustomReplace() {
  var replaceThis = document.getElementById('customReplaceThis');
  var replaceWith = document.getElementById('customReplaceWith');
  var cs = document.getElementById('customReplaceCS');
  var flags = "gm";
  if (!cs.checked) {
    flags += "i";
  }
  replaceRegexp(replaceThis.value, replaceWith.value, flags);
}
 
function insertCustomForm(formText) {
  var customBar = document.getElementById('customBar');
  if (customBar == null) return;
 
  var customForm = document.createElement('div');
  customForm.setAttribute('id', 'customForm');
  customForm.setAttribute('style', 'margin-bottom:2px;border:1px solid #aaaaaa;padding:3px');
  customForm.innerHTML = 
    '<img id="customFormClose" src="http://upload.wikimedia.org/wikipedia/hu/b/bd/Close.png" ' +
    'align="right" style="margin:2px" onClick="deleteCustomForm()" ' +
    'onmouseover="document.images.namedItem(\'customFormClose\').src=\'http://upload.wikimedia.org/wikipedia/hu/c/cf/Close-hl.png\'" ' +
    'onmouseout="document.images.namedItem(\'customFormClose\').src=\'http://upload.wikimedia.org/wikipedia/hu/b/bd/Close.png\'"' +
    'onmousedown="document.images.namedItem(\'customFormClose\').src=\'http://upload.wikimedia.org/wikipedia/hu/e/eb/Close-dn.png\'">' +
    formText;
 
  var oldForm = document.getElementById('customForm');
  if (oldForm != null) {
    customBar.parentNode.replaceChild(customForm, oldForm);
  } else {
    customBar.parentNode.insertBefore(customForm, customBar);
  }
}
 
function deleteCustomForm() {
  var customForm = document.getElementById('customForm');
  if (customForm != null)
    customForm.parentNode.removeChild(customForm);
}
 
function orszagEnHu() {
  var orszag = [
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,

];
 
  for (var i = 0; i < orszag.length; i++) {
    var enorszag = orszag;
    var huorszag = orszag;
    replaceRegexp(enorszag, huorszag, "gm");
  }
}
 
// Initializes edit box
function myOnloadHook() {
  // Textarea positioning doesn't work in Opera
  if (is_opera) return;
 
  // Find the element that comes right after the special character box
  var textArea = document.getElementsByName('wpTextbox1');
  if (textArea.item(0) != null) {
    var insertPos = textArea.item(0).nextSibling.nextSibling; // this is a <br/>
    var customBar = createCustomBar();
    insertPos.parentNode.replaceChild(customBar, insertPos);
 
    // Remove global spec char bar
    var specChars = document.getElementById('specChar');
    if (specChars != null) {
      specChars.parentNode.removeChild(specChars);
    }
  }
}
 
if (window.addEventListener != null) window.addEventListener("load", myOnloadHook, false);
 else if (window.attachEvent) window.attachEvent("onload", myOnloadHook);
 
// </nowiki>
 
/* AntiVandal */
document.write('<script type="text/javascript" src="' 
             + 'http://hu.wikipedia.org/w/index.php?title=User:AntiVandal/recent2.js' 
             + '&action=raw&ctype=text/javascript&dontcountme=s"></script>');
 
/* Silent rollback */
document.write('<script type="text/javascript" src="' 
             + 'http://hu.wikipedia.org/w/index.php?title=User:Tgr/vandal.js' 
             + '&action=raw&ctype=text/javascript&dontcountme=s"></script>');

document.write('<script type="text/javascript" src="' 
             + 'http://hu.wikipedia.org/w/index.php?title=User:G_ambrus/statisztika.js' 
             + '&action=raw&ctype=text/javascript&dontcountme=s"></script>');

document.write('<script type="text/javascript" src="' 
             + 'http://hu.wikipedia.org/w/index.php?title=User:G_ambrus/gugliref.js' 
             + '&action=raw&ctype=text/javascript&dontcountme=s"></script>');

document.write('<script type="text/javascript" src="' 
             + 'http://hu.wikipedia.org/w/index.php?title=User:Bdamokos/HotCat.js' 
             + '&action=raw&ctype=text/javascript&dontcountme=s"></script>');

/* Helyreállításhoz segítség */
document.write('<script type="text/javascript" src="'+
'http://hu.wikipedia.org/w/index.php?title=User:KovacsUr/adminseged.js'+
'&action=raw&ctype=text/javascript&dontcountme=s"></script>');