Megjegyzés: közzététel után frissítened kell a böngésződ gyorsítótárát, hogy lásd a változásokat.

  • Firefox / Safari: tartsd lenyomva a Shift gombot és kattints a Frissítés gombra a címsorban, vagy használd a Ctrl–F5 vagy Ctrl–R (Macen ⌘–R) billentyűkombinációt
  • Google Chrome: használd a Ctrl–Shift–R (Macen ⌘–Shift–R) billentyűkombinációt
  • Internet Explorer / Edge: tartsd nyomva a Ctrl-t, és kattints a Frissítés gombra, vagy nyomj Ctrl–F5-öt
  • Opera: Nyomj Ctrl–F5-öt
/* hivatkozások a bal oldali menübe */
 
$(function() {addPortletLink('p-navigation', 'http://hu.wikipedia.org/wiki/Wikip%C3%A9dia:Kocsmafal', 'Kocsmafal', 'n-kocsmafal')});
$(function() {addPortletLink('p-navigation', 'http://hu.wikipedia.org/wiki/Wikip%C3%A9dia:Refer%C3%A1l%C3%A1s', 'Referálás', 'n-referálás')});
$(function() {addPortletLink('p-navigation', 'http://hu.wikipedia.org/wiki/Wikip%C3%A9dia:Javaslatok_kiemelt_sz%C3%B3cikkekre', 'Kiemeltszavazás', 'n-kiemeltszavazás')});
$(function() {addPortletLink('p-navigation', 'http://hu.wikipedia.org/wiki/Wikip%C3%A9dia:Adminisztr%C3%A1torok_%C3%BCzen%C5%91fala', 'Adminüzenőfal', 'n-adminüzenőfal')});
$(function() {addPortletLink('p-navigation', 'http://hu.wikipedia.org/wiki/Kateg%C3%B3ria:Azonnali_t%C3%B6rl%C3%A9sre_v%C3%A1r%C3%B3_lapok', 'Azonnal törlendő', 'n-azonnali')});
$(function() {addPortletLink('p-navigation', 'http://hu.wikipedia.org/wiki/Sablon:Szubcsonkok', 'Szubcsonkok', 'n-szubcsonkok')});
$(function() {addPortletLink('p-navigation', 'http://hu.wikipedia.org/wiki/Wikip%C3%A9dia:Szerz%C5%91i_jogok_val%C3%B3sz%C3%ADn%C5%B1_megs%C3%A9rt%C3%A9se', 'Jogsértő lapok', 'n-jogsértő')});
$(function() {addPortletLink('p-navigation', 'http://hu.wikipedia.org/wiki/Wikip%C3%A9dia:Kateg%C3%B3riajavaslatok', 'Kategóriajavaslatok', 'n-kategória')});
$(function() {addPortletLink('p-navigation', 'http://hu.wikipedia.org/wiki/Wikip%C3%A9dia:IRC-csatorn%C3%A1k', 'IRC-csatornák', 'n-irc')});
$(function() {addPortletLink('p-navigation', 'http://hu.wikipedia.org/wiki/Szerkeszt%C5%91:Syp/Sz%C3%B3cikkek', 'SyP szócikkei', 'n-syp')});

// <pre>
// -*- mode:java; coding:utf-8 -*-
//  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="wiki/Wikipédia:Különleges_karakterek" title="Wikipédia:Különleges karakterek">' +
    'Különleges</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('–','','')\">en</a> · " +
//    "<a href=\"javascript:insertTags('½','','')\">½</a> · " +
//    "<a href=\"javascript:insertTags('†','','')\">†</a> · " +
    "<a href=\"javascript:insertTags('<br>','','')\">&lt;br&gt;</a> · " +
    "<a href=\"javascript:insertTags('<pre>','</pre>','')\">&lt;pre&gt;</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%7B','%7D%7D','')\">{{}}</a> · " +
    "<a href=\"javascript:insertTags('%7B%7BKülső/Angol%7D%7D','','')\"><small>angol</small></a> · " +
    "<a href=\"javascript:insertTags('%7B%7Blektor%7D%7D','','')\"><small>lektor</small></a> · " +
//    "<a href=\"javascript:insertTags('%7B%7Bcsonk%7D%7D','','')\"><small>csonk</small></a> · " +
    "<a href=\"javascript:insertTags('%7B%7Benwiki|','%7D%7D','')\"><small>enwiki</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ő1|url=','%7D%7D','')\"><small>jogsértő</small></a> · " +
    "<a href=\"javascript:insertTags('<!--','--><small>[ személyeskedés törölve [[User_vita:Syp|Syp]] ]</small>','')\"><small>szem</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:SajatReplace()\"><small>saját csere</small></a> . " + 
    "<a href=\"javascript:customReplaceForm()\"><small>regexp csere</small></a>";

  return boxDiv;
}

function replaceRegexp(replaceWhat, replaceWith, modifiers) {
  if (modifiers == null) {
    modifiers = "";
  }
  var txtarea = document.editform.wpTextbox1;
  // IE
  if(document.selection  && !is_gecko) {
    var theSelection = document.selection.createRange().text;		
    txtarea.focus();
    theSelection = theSelection.replace(replaceWhat, replaceWith);
    document.selection.createRange().text = theSelection;
    // Mozilla
  } else if(txtarea.selectionStart || txtarea.selectionStart == '0') {
    // This is probably more complicated than it needs to be
    var startPos = txtarea.selectionStart;
    var endPos = txtarea.selectionEnd;
    var scrollTop=txtarea.scrollTop;

    var pattern = new RegExp(replaceWhat, modifiers);
    var myText = (txtarea.value).replace(pattern, replaceWith);

    txtarea.value = myText;		

    txtarea.focus();

    var cPos=startPos;
    txtarea.selectionStart=cPos;
    txtarea.selectionEnd=cPos;
    txtarea.scrollTop=scrollTop;

    // All others
  } else {
    alert("No support for this browser yet");
    return;
  }
  // reposition cursor if possible
  if (txtarea.createTextRange) txtarea.caretPos = document.selection.createRange().duplicate();
}

// Replaces Latin 1 and some other chars with properly encoded Hungarian Latin 2 equivalents
function fixLatin1Chars() {	
  replaceRegexp("Õ", "Ő", "g");
  replaceRegexp("Û", "Ű", "g");
  replaceRegexp("õ", "ő", "g");
  replaceRegexp("ô", "ő", "g");
  replaceRegexp("û", "ű", "g");
  replaceRegexp("&#337;", "ő", "g");
  replaceRegexp("&#369;", "ű", "g");
}

// Sajat lista alapjan cserelgetunk dolgokat
function SajatReplace() {	
  replaceRegexp(" - ", " – ", "g");
  replaceRegexp(" -,", " –,", "g");
  replaceRegexp("--", "–", "g");
  replaceRegexp("\\(''", "''(", "g");
  replaceRegexp("''\\)", ")''", "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 = [
		["January", "január"],
		["February", "február"],
		["March", "március"],
		["April", "április"],
		["May", "május"],
		["June", "június"],
		["July", "július"],
		["August", "augusztus"],	
		["September", "szeptember"],
		["October", "október"],
		["November", "november"],
		["December", "december"]
		];

  for (var i = 0; i < months.length; i++) {
    var enMonth = months[i][0];
    var huMonth = months[i][1];
    // alert("Replacing " + enMonths + " with " + huMonth);
    // Replace "[[November 15]], [[2005]]" with "[[2005]]. [[november 15]]."
    // $1 = "15", $2 = "2005"
    replaceRegexp("\\[\\[" + enMonth + " (\\d+)\\]\\],?\\s*\\[\\[(\\d{4})\\]\\]", "[[$2]]. [[" + huMonth + " $1]].", "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="30"> ' +
    'erre: <input id="customReplaceWith" type="text" size="30"> ' +
    '<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);
}

// 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);
//    }
  }
}

// VIEW SOURCE
$(function () {
  if (location.href.indexOf('viewsource=1') != -1) {
    sl = document.getElementById('wpSummaryLabel'); sl.parentNode.removeChild(sl);
    ed = document.getElementById('wpSummary').parentNode; ed.parentNode.removeChild(ed);
    return;
  }
  editbutton = document.getElementById('ca-edit');
  if (editbutton && location.href.indexOf('action=edit')==-1) {
    editlink = editbutton.getElementsByTagName('a')[0].href + '&viewsource=1';
    tabs = document.getElementById('p-cactions').getElementsByTagName('ul')[0];
    na = document.createElement('a');
    na.href = editlink; na.appendChild(document.createTextNode('lapforrás'));
    li = document.createElement('li'); li.id = 'ca-viewsource'; li.appendChild(na);
    tabs.insertBefore(li,editbutton);
  }
});

//

if (window.addEventListener != null) window.addEventListener("load", myOnloadHook, false);
 else if (window.attachEvent) window.attachEvent("onload", myOnloadHook);

// [[:en:User:Lupin/popups.js]]

mw.loader.load('//en.wikipedia.org/w/index.php?title=User:Lupin/popups.js&action=raw&ctype=text/javascript&dontcountme=s');
popupDelay=2;
popupAdminLinks=true;
popupSubpopups=false;
popupRedlinkRemoval=true;


// Combobox
mw.loader.load('//hu.wikipedia.org/w/index.php?title=Szerkesztő:Tgr/combo.js&action=raw&ctype=text/javascript&dontcountme=s');
// </pre>