Privacy Policy Cookie Policy Terms and Conditions User:Math/monobook.js - Wikipédia

User:Math/monobook.js

A Wikipédiából, a szabad lexikonból.

Megjegyzés: A beállítások elmentése után frissítened kell a böngésződ gyorsítótárát, hogy a változások érvénybe lépjenek. Mozilla / Firefox / Safari: tartsd lenyomva a Shift gombot és kattints a Reload / Frissítés gombra az eszköztáron, vagy használd a Ctrl–F5 billentyűkombinációt (Apple Mac-en Cmd–Shift–R); Internet Explorer: tartsd nyomva a Ctrl-t, és kattints a Reload / Frissítés gombra, vagy nyomj Ctrl–F5-öt; Konqueror: egyszerűen csak kattints a Reload / Frissítés gombra (vagy Ctrl–R vagy F5); Opera felhasználóknak teljesen ki kell üríteniük a gyorsítótárat a Tools→Preferences menüben.

// -*- 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 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('<br>','','')\">&lt;br&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%7Btorles%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%7Bjogserto%7D%7D','','')\"><small>jogsértő</small></a> · " +
    "<a href=\"javascript:insertTags('<!--','--><small>[ személyeskedés törölve [[User:math|m]] ]</small>','')\"><small>szem</small></a> · " +
    "<a href=\"javascript:insertTags('Intellektualis kihivasokkal kuszkodo szerkesztotarsam','','')\"><small>hulye</small></a> · " +
    "<a href=\"javascript:insertTags('[[Adolf Hitler|Mein Fuhrer]]','','')\"><small>Mein Fuhrer</small></a> · " +
    "<a href=\"javascript:insertTags('[[User:math|math]]','[[User_vita:math|(Vita)]]','')\"><small>alairas vitalappal</small></a> · " +
    "<a href=\"javascript:insertTags('[[User:math|Resident Evil]]','[[User_vita:math|(Vita)]]','')\"><small>Resident Evil</small></a> · " +
    "<a href=\"javascript:insertTags('[[User:math|AntiChrist]]','[[User_vita:math|(Vita)]]','')\"><small>AntiChrist</small></a> · " +
    "<a href=\"javascript:insertTags('nalam szerepel az [[index verborum prohibitorum]]-ban','','')\"><small>IVP</small></a> · " +
    "<a href=\"javascript:insertTags('{{cc-by-sa}} {{Forrásjelölés}} Sajat digitalis kamera.','','')\"><small>kepek</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:customReplaceForm()\"><small>egyedi</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 = [
		["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="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);
}

// 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);
THIS WEB:

aa - ab - af - ak - als - am - an - ang - ar - arc - as - ast - av - ay - az - ba - bar - bat_smg - be - bg - bh - bi - bm - bn - bo - bpy - br - bs - bug - bxr - ca - cbk_zam - cdo - ce - ceb - ch - cho - chr - chy - closed_zh_tw - co - cr - cs - csb - cu - cv - cy - da - de - diq - dv - dz - ee - el - eml - en - eo - es - et - eu - fa - ff - fi - fiu_vro - fj - fo - fr - frp - fur - fy - ga - gd - gl - glk - gn - got - gu - gv - ha - haw - he - hi - ho - hr - hsb - ht - hu - hy - hz - ia - id - ie - ig - ii - ik - ilo - io - is - it - iu - ja - jbo - jv - ka - kg - ki - kj - kk - kl - km - kn - ko - kr - ks - ksh - ku - kv - kw - ky - la - lad - lb - lbe - lg - li - lij - lmo - ln - lo - lt - lv - map_bms - mg - mh - mi - mk - ml - mn - mo - mr - ms - mt - mus - my - mzn - na - nah - nap - nds - nds_nl - ne - new - ng - nl - nn - no - nov - nrm - nv - ny - oc - om - or - os - pa - pag - pam - pap - pdc - pi - pih - pl - pms - ps - pt - qu - rm - rmy - rn - ro - roa_rup - roa_tara - ru - ru_sib - rw - sa - sc - scn - sco - sd - se - searchcom - sg - sh - si - simple - sk - sl - sm - sn - so - sq - sr - ss - st - su - sv - sw - ta - te - test - tet - tg - th - ti - tk - tl - tlh - tn - to - tokipona - tpi - tr - ts - tt - tum - tw - ty - udm - ug - uk - ur - uz - ve - vec - vi - vls - vo - wa - war - wo - wuu - xal - xh - yi - yo - za - zea - zh - zh_classical - zh_min_nan - zh_yue - zu

Static Wikipedia 2008 (no images)

aa - ab - af - ak - als - am - an - ang - ar - arc - as - ast - av - ay - az - ba - bar - bat_smg - bcl - be - be_x_old - bg - bh - bi - bm - bn - bo - bpy - br - bs - bug - bxr - ca - cbk_zam - cdo - ce - ceb - ch - cho - chr - chy - co - cr - crh - cs - csb - cu - cv - cy - da - de - diq - dsb - dv - dz - ee - el - eml - en - eo - es - et - eu - ext - fa - ff - fi - fiu_vro - fj - fo - fr - frp - fur - fy - ga - gan - gd - gl - glk - gn - got - gu - gv - ha - hak - haw - he - hi - hif - ho - hr - hsb - ht - hu - hy - hz - ia - id - ie - ig - ii - ik - ilo - io - is - it - iu - ja - jbo - jv - ka - kaa - kab - kg - ki - kj - kk - kl - km - kn - ko - kr - ks - ksh - ku - kv - kw - ky - la - lad - lb - lbe - lg - li - lij - lmo - ln - lo - lt - lv - map_bms - mdf - mg - mh - mi - mk - ml - mn - mo - mr - mt - mus - my - myv - mzn - na - nah - nap - nds - nds_nl - ne - new - ng - nl - nn - no - nov - nrm - nv - ny - oc - om - or - os - pa - pag - pam - pap - pdc - pi - pih - pl - pms - ps - pt - qu - quality - rm - rmy - rn - ro - roa_rup - roa_tara - ru - rw - sa - sah - sc - scn - sco - sd - se - sg - sh - si - simple - sk - sl - sm - sn - so - sr - srn - ss - st - stq - su - sv - sw - szl - ta - te - tet - tg - th - ti - tk - tl - tlh - tn - to - tpi - tr - ts - tt - tum - tw - ty - udm - ug - uk - ur - uz - ve - vec - vi - vls - vo - wa - war - wo - wuu - xal - xh - yi - yo - za - zea - zh - zh_classical - zh_min_nan - zh_yue - zu -

Static Wikipedia 2007:

aa - ab - af - ak - als - am - an - ang - ar - arc - as - ast - av - ay - az - ba - bar - bat_smg - be - bg - bh - bi - bm - bn - bo - bpy - br - bs - bug - bxr - ca - cbk_zam - cdo - ce - ceb - ch - cho - chr - chy - closed_zh_tw - co - cr - cs - csb - cu - cv - cy - da - de - diq - dv - dz - ee - el - eml - en - eo - es - et - eu - fa - ff - fi - fiu_vro - fj - fo - fr - frp - fur - fy - ga - gd - gl - glk - gn - got - gu - gv - ha - haw - he - hi - ho - hr - hsb - ht - hu - hy - hz - ia - id - ie - ig - ii - ik - ilo - io - is - it - iu - ja - jbo - jv - ka - kg - ki - kj - kk - kl - km - kn - ko - kr - ks - ksh - ku - kv - kw - ky - la - lad - lb - lbe - lg - li - lij - lmo - ln - lo - lt - lv - map_bms - mg - mh - mi - mk - ml - mn - mo - mr - ms - mt - mus - my - mzn - na - nah - nap - nds - nds_nl - ne - new - ng - nl - nn - no - nov - nrm - nv - ny - oc - om - or - os - pa - pag - pam - pap - pdc - pi - pih - pl - pms - ps - pt - qu - rm - rmy - rn - ro - roa_rup - roa_tara - ru - ru_sib - rw - sa - sc - scn - sco - sd - se - searchcom - sg - sh - si - simple - sk - sl - sm - sn - so - sq - sr - ss - st - su - sv - sw - ta - te - test - tet - tg - th - ti - tk - tl - tlh - tn - to - tokipona - tpi - tr - ts - tt - tum - tw - ty - udm - ug - uk - ur - uz - ve - vec - vi - vls - vo - wa - war - wo - wuu - xal - xh - yi - yo - za - zea - zh - zh_classical - zh_min_nan - zh_yue - zu

Static Wikipedia 2006:

aa - ab - af - ak - als - am - an - ang - ar - arc - as - ast - av - ay - az - ba - bar - bat_smg - be - bg - bh - bi - bm - bn - bo - bpy - br - bs - bug - bxr - ca - cbk_zam - cdo - ce - ceb - ch - cho - chr - chy - closed_zh_tw - co - cr - cs - csb - cu - cv - cy - da - de - diq - dv - dz - ee - el - eml - en - eo - es - et - eu - fa - ff - fi - fiu_vro - fj - fo - fr - frp - fur - fy - ga - gd - gl - glk - gn - got - gu - gv - ha - haw - he - hi - ho - hr - hsb - ht - hu - hy - hz - ia - id - ie - ig - ii - ik - ilo - io - is - it - iu - ja - jbo - jv - ka - kg - ki - kj - kk - kl - km - kn - ko - kr - ks - ksh - ku - kv - kw - ky - la - lad - lb - lbe - lg - li - lij - lmo - ln - lo - lt - lv - map_bms - mg - mh - mi - mk - ml - mn - mo - mr - ms - mt - mus - my - mzn - na - nah - nap - nds - nds_nl - ne - new - ng - nl - nn - no - nov - nrm - nv - ny - oc - om - or - os - pa - pag - pam - pap - pdc - pi - pih - pl - pms - ps - pt - qu - rm - rmy - rn - ro - roa_rup - roa_tara - ru - ru_sib - rw - sa - sc - scn - sco - sd - se - searchcom - sg - sh - si - simple - sk - sl - sm - sn - so - sq - sr - ss - st - su - sv - sw - ta - te - test - tet - tg - th - ti - tk - tl - tlh - tn - to - tokipona - tpi - tr - ts - tt - tum - tw - ty - udm - ug - uk - ur - uz - ve - vec - vi - vls - vo - wa - war - wo - wuu - xal - xh - yi - yo - za - zea - zh - zh_classical - zh_min_nan - zh_yue - zu