Eʼtibor bering: Oʻzgartirishlaringizni koʻrish uchun, yangi moslamalaringizning saqlashdan keyin, brauzer keshini tozalash kerak:
Mozilla / Firefox: Ctrl+Shift+R, IE: Ctrl+F5, Safari: Cmd+Shift+R, Konqueror: F5, Opera: Tools → Preferences orqali keshni tozalang.

// [[Vikipediya:Vikifikator]] 

/* <pre> ↓
var txtS;

var wmFullTextS = 'Vikifikator2 ushbu sahifadagi BUTUN matnni qayta ishlaydi. Davom etsinmi?';
var wmCantWorkS = 'Vikifikator brauzeringizda ishlamaydi';
var wmWontWorkS = 'Vikifikator Netscape 4.x va eskirogʻida ishlamaydi';


var wmCategoryNS = 'Category';
var wmTemplateNS = 'Template';
var wmUserNS = 'User';
var wmImageNS = 'Image';
var wmMediaNS = 'Media';

var wmLocaleNS = new Array(wmCategoryNS, wmTemplateNS, wmUserNS, wmImageNS, wmMediaNS);
var wmEnNS = new Array('category', 'template', 'user', 'image', 'media');

if(document.editform && document.editform.wpTextbox1) document.editform.wpTextbox1.onkeyup = function(event){
  if(event.keyCode == 32){
  	var txtarea = document.editform.wpTextbox1;
  	var startPos = txtarea.selectionStart;
    var endPos = txtarea.selectionEnd;
    var scrollTop = txtarea.scrollTop;
    var letter_pattern = /[0-9a-z`'ʻʼ‘’]/i;
    var letter = "";
    var letter_pos = 0;
    var pointfound = false;
    var spacefound = false;
    txtS = ". " + (txtarea.value);
  	for(i = startPos - 1; i >= 0; i--){
  		k = txtS.substring(i, i + 1);
  		//confirm("" + k + " " + i);
  		if(letter_pattern.test(k) === true && spacefound === false){
  			letter = k;
  			letter_pos = i - 2;
  		}
  		else{
  			if(k == " " || k == "\n"){
  				spacefound = true;
  			}
  			else if((k == "." || k == "!" || k == "?") && spacefound === true){
  				pointfound = true;
  				break;
  			}
  			else{
  				break;
  			}
  		}
  	}
  	if(pointfound === true){
  		if(letter != letter.toUpperCase()){
  			txtarea.value = txtarea.value.substring(0, letter_pos) + letter.toUpperCase() + txtarea.value.substring(letter_pos + 1, txtarea.value.length);
            //txtarea.focus();
            txtarea.selectionStart = startPos;
		    txtarea.selectionEnd = endPos;
		    txtarea.scrollTop = scrollTop;
  		}
  	}
  }
}


if (window.event) {
    document.onkeypress = pressed;
}

function pressed() //On Ctrl+Enter (MSIE)
{ key = window.event.keyCode; if (key == 10) { Wikify(); } }

//======================================
function Wikify() {
    check_regexp(); // Check whether regular expressions are supported
    document.editform.wpTextbox1.focus();
    var txtarea = document.editform.wpTextbox1;
    if (document.selection && !is_gecko)/* IE */{
        txtS = " " + document.selection.createRange().text;
        if (txtS == " ") { all_text(); } // If nothing was selected;
        else {
            Process();
            txtS = txtS.substr(1, txtS.length - 1);
            document.selection.createRange().text = txtS;
        }
    }
    else if ((txtarea.selectionStart || txtarea.selectionStart == '0') && (navigator.productSub > 20031000)) /*Gecko-browsers older then 10.2003*/{
        var startPos = txtarea.selectionStart;
        var endPos = txtarea.selectionEnd;
        var scrollTop = txtarea.scrollTop;
        txtS = " " + (txtarea.value).substring(startPos, endPos);
        if (txtS == " ") { all_text(); } // If nothing was selected;
        else {
            Process();
            txtS = txtS.substr(1, txtS.length - 1);
            txtarea.value = txtarea.value.substring(0, startPos) + txtS + txtarea.value.substring(endPos, txtarea.value.length);
            txtarea.focus();
        }
    }
    else { if (confirm(wmFullTextS)) { all_text(); } } // Other browsers
}
//======================================
function all_text()// Process all text
{
    txtS = " " + document.editform.wpTextbox1.value;
    Process();
    txtS = txtS.substr(1, txtS.length - 1);
    document.editform.wpTextbox1.value = txtS;
}
//======================================
function check_regexp()// Check whether regular expressions are supported
{
    var reg1 = "code";
    reg1 = reg1.replace(/d/g, "r");
    if (reg1 != "core") { alert(wmCantWorkS); exit; }
    b_ver = navigator.appVersion.substr(0, 1);
    if (navigator.appName == "Netscape" && b_ver < 5) { alert(wmWontWorkS); exit; }
    return;
}
function Process()
// We have 3 more pairs of safe chars in \x1A — \x1F !
{

    //var nowiki = ReplaceElements( '\<math\>(.|\r|\n)+?\<\/math\>, "\x03", "\x04" );
    //That variant will make ReplaceTags() function unnecessary, but it's so ugly...

    var nowiki = ReplaceTags('nowiki', "\x03", "\x04");
    var pre = ReplaceTags('pre', "\x12", "\x13");
    var math = ReplaceTags('math', "\x05", "\x06");
    var gallery = ReplaceTags('gallery', "\x14", "\x15");


    // Exclude lines starting with space
    f_space = txtS.substr(0, 1);
    txtS = txtS.substr(1, txtS.length - 1);

    var sp_lines = ReplaceElements("^( )(.+)$", "\x16", "\x17");

    txtS = f_space + txtS;

    ProcessNS(wmEnNS, wmLocaleNS);
    CorrectRanges();

    // Exclude templates and internal links
    var templates = ReplaceElements("\\{\\{(.|\\r|\\n)+?\\}\\}", "\x18", "\x19");
    var links = ReplaceElements("(\\[\\[)(.*?)(\\||\\]\\])", "\x10", "\x11");

    HTML2Wiki();

    // Exclude tags and tag attributes (all text in quotes after "=" sign)
    var attrs = ReplaceElements('(=)(\\s?)(\\' + '")(.*?)(\\")', "\x0E", "\x0F");
    var tags = ReplaceElements("<([^>]*?)>", "\x01", "\x02");

    ProcessTypography();

    //alert(txtS);

    RestoreElements(tags, "\x01", "\x02");
    RestoreElements(attrs, "\x0E", "\x0F");
    RestoreElements(links, "\x10", "\x11");
    RestoreElements(templates, "\x18", "\x19");
    RestoreElements(sp_lines, "\x16", "\x17");
    RestoreElements(gallery, "\x14", "\x15");
    RestoreElements(math, "\x05", "\x06");
    RestoreElements(pre, "\x12", "\x13");
    RestoreElements(nowiki, "\x03", "\x04");

}

function HTML2Wiki() {
    // UZBEK02
    //============================TEMPO=====
    txtS = txtS.replace(/(A|a|E|e|N|n|O|o|G|g|T|t)\'''/g, "$1 20072006NGPP132604")
    txtS = txtS.replace(/(A|a|E|e|N|n|O|o|G|g|T|t)\''/g, "$1 20072006NGPP132604_onlytwo")
    txtS = txtS.replace(/(A|a|E|e|N|n|T|t)\'/g, "$1ʻ")
    txtS = txtS.replace(/(O|o|G|g)\'/g, "$1ʻ")
    txtS = txtS.replace(/(A|a|E|e|N|n|O|o|G|g|T|t)\ ?20072006NGPP132604_onlytwo/g, "$1''")
    txtS = txtS.replace(/(A|a|E|e|N|n|O|o|G|g|T|t)\ ?20072006NGPP132604/g, "$1'''")

    // Replace <b>, <strong> tags with ''' and <i>, <em> with ''
    txtS = txtS.replace(/\<\/?(b|strong)\>/gim, "\'\'\'")
    txtS = txtS.replace(/\<\/?(i|em)\>/gim, "\'\'")

    // Replace <hr> tag with ----, improve <hr> and <br> tags
    txtS = txtS.replace(/\<hr ?\/?\>/gi, "----")
    txtS = txtS.replace(/\<hr ([^\>\/]+?) ?\/?\>/gi, "<hr $1 />")
    txtS = txtS.replace(/\<br\/?\>/gi, "<br />")
    txtS = txtS.replace(/\<br ([^\>\/]+?) ?\/?\>/gi, "<br $1 />")

}

// Process default namespaces

function ProcessNS(En_NS_List, Loc_NS_List) {

    for (i = 0; i < En_NS_List.length; i++) {
        //alert("(\\[\\[)(:?)(" + En_NS_List[i] + "|" +
        //Loc_NS_List[i] + ")(:)( *)");

        txtS = txtS.replace(new RegExp("(\\[\\[:?)(" + En_NS_List[i] + "|" +
  Loc_NS_List[i] + "):( *)", "gi"), "$1" + Loc_NS_List[i] + ":");

    }
}

//======================================
// Replace '<replaced_tag> ... </replaced_tag>' (<nowiki> <br/> </nowiki>)
// with 'opepening_char + tag's counter + closing_char' ('\x03'+1'+'\x04')
//======================================

function ReplaceTags(replaced_tag, op_char, cl_char)

// @replaced_tag - tag to be replaced
// @op_char, @cl_char (opening & closing chars) - "Safe" pair of 
// unicode unprintable characters, that will be used in replacement
{

    var counter = 0; //tags counter

    // RegExp pattern
    var pattern = "\\<" + replaced_tag + "\\>(.|\r|\n)+?\<\\/" + replaced_tag + "\\>";

    // RegExp template to be replaced (multiline text between 
    // <replaced_tag> and </replaced_tag> case sensitive tags)
    var replaced_regexp = new RegExp(pattern, "im")

    // Buffer for replaced matches storage. It's array of matching substrings -
    // multiline text between <replaced_tag> and </replaced_tag> case sensitive tags ()
    matches_buffer = txtS.match(new RegExp(pattern, "gim"));

    // while some substring of txtS matches replaced_regexp...
    while (replaced_regexp.test(txtS)) {
        txtS = txtS.replace(replaced_regexp, op_char + ++counter + cl_char);
    }
    return matches_buffer;
}

//======================================
// Replace '<replaced_tag> ... </replaced_tag>' (<nowiki> <br/> </nowiki>)
// with 'opepening_char + tag's counter + closing_char' ('\x03'+1'+'\x04')
//======================================

function ReplaceElements(req_exp, op_char, cl_char)

// @req_exp - reqular expression to be replaced
// @op_char, @cl_char (opening & closing chars) - "Safe" pair of 
// unicode unprintable characters, that will be used in replacement
{

    var counter = 0; //tags counter

    // RegExp template to be replaced (multiline, case sensitive)
    var replaced_regexp = new RegExp(req_exp, "m")

    // Buffer for replaced matches storage. It's array of matching substrings.
    // (multiline, case sensitive, global)
    matches_buffer = txtS.match(new RegExp(req_exp, "gm"));

    // while some substring of txtS matches replaced_regexp...
    while (replaced_regexp.test(txtS)) {
        //alert(txtS.match(replaced_regexp));
        txtS = txtS.replace(replaced_regexp, op_char + ++counter + cl_char);
    }
    return matches_buffer;
}

//======================================
// Restore text, that was damaged by replacing 3 chars with substring from array
//======================================

function RestoreElements(replaced_buffer, op_char, cl_char)

// @replaced_buffer - array of replaced substrings.
// @op_char, @cl_char (opening & closing chars) - "Safe" pair 
// to be replaced with <replaced_tag> and </replaced_tag> accordingly
{

    var counter = 0; //tags counter

    // RegExp template to be replaced (3 chars: tag's counter 
    // surrunded by "Safe" pair)
    var replaced_regexp = new RegExp("\\" + op_char + "([0-9]*)\\" + cl_char);

    //replaced_regexp = /\x03([0-9]*)\x04/

    // while some substring of txtS matches replaced_regexp...
    while (replaced_regexp.test(txtS)) {
        txtS = txtS.replace(replaced_regexp, replaced_buffer[counter++]);
    }
    return txtS;
}

// Corrects year and century ranges in text
function CorrectRanges() {
    // Correct year ranges
    //txtS = txtS.replace(/(\(|\s)(\[?\[?[12]?\d{3}\]?\]?)[\u00A0 ]?(-|--|–|—) ?(\[?\[?[12]?\d{3}\]?\]?)(\W)/g, "$1$2—$4$5")
    //txtS = txtS.replace(/(\[?\[?[12]?\d{3}\]?\]?) ?(г\.|гг\.)/g, "$1\u00A0$2")
    // Correct century ranges
    //txtS = txtS.replace(/(\(|\s)(\[?\[?[IVX]{1,5}\]?\]?)[\u00A0 ]?(-|--|–|—) ?(\[?\[?[IVX]{1,5}\]?\]?)(\W)/g, "$1$2—$4$5")
    //txtS = txtS.replace(/(\[?\[?[IVX]{1,5}\]?\]?) ?(в\.|вв\.)/g, "$1\u00A0$2")
}

/***************************************************
Typographical considerations
***************************************************/
function ProcessTypography() {

    // Insert spaces in titles
    txtS = txtS.replace(/^(=+)([ \t\f\v]*)(.*?)([ \t\f\v]*)(=+)$/gm, "$1 $3 $1")
    //======================================
    // Use 1 character to display squaring and cubing
    txtS = txtS.replace(/(<sup>2<\/sup>|&sup2;)/g, "²");
    txtS = txtS.replace(/(<sup>3<\/sup>|&sup3;)/g, "³");
    txtS = txtS.replace(/(\^2)(\D)/g, "²$2");
    txtS = txtS.replace(/(\^3)(\D)/g, "³$2");
    //======================================
    // Replace right HTML symbols with wrong ones in order to process everything
    txtS = txtS.replace(/–/g, "-")
    txtS = txtS.replace(/(«|»|“|”|„|\&((la|ra|bd|ld)quo|#132|#147|#148|quot);)/g, "\"")
    //======================================
    // Replace set of 'less then' or 'greater then' symbols (<< or >>) with usual double quotes
    txtS = txtS.replace(/(<<)(\S.+\S)(>>)/g, "\"$2\"")
    //======================================
    // Process degree sign "°", "+-" and "~="
    txtS = txtS.replace(/(\+[--])|(&plusmn;)/g, "±")
    txtS = txtS.replace(/(~=)/g, "≈")
    txtS = txtS.replace(/\&deg;/g, "°")
    txtS = txtS.replace(/([ =≈≠≤≥<>("'|]|^)([+±−\-]?\d+?(?:[.,]\d+?)?)(([ °^*]| [°^*])[CС])(?=[ "').,;!?|]|$)/gm, "$1$2\u00A0°C")
    txtS = txtS.replace(/([ =≈≠≤≥<>("'|]|^)([+±−\-]?\d+?(?:[.,]\d+?)?)(([ °^*]| [°^*])F)(?=[ "').,;|!?]|$)/gm, "$1$2\u00A0°F")
    //======================================
    // Replace "...", "&hellip;" and "&#133;" with ellipsis
    txtS = txtS.replace(/(\.{3}|\&(hellip|#133);)/g, '…')
    // Apostrophe handler
    txtS = txtS.replace(/([\wа-яА-ЯёЁ])'([\wа-яА-ЯёЁ])/g, "$1’$2")
    // Minus handler
    txtS = txtS.replace(/(sup\>|sub\>|\s)-(\d)/g, "$1−$2")
    //======================================
    // Replace hyphens and en dashes with normal dashes
    txtS = txtS.replace(/\&(#151|[nm]dash);/g, "—")
    txtS = txtS.replace(/(&nbsp;|[\f\n\r\t\v\u00A0\u2028\u2029])(-|--|–) /g, "$1— ")
    txtS = txtS.replace(/(\d)--(\d)/g, "$1—$2")
    // Insert non-braiking space before dashes
    txtS = txtS.replace(/(\S) (-|--|–|—) (\S)/g, "$1\u00A0— $3")
    //======================================
    // Special characters: ©, ®, ™, §, €, ¥ и £.
    txtS = txtS.replace(/\&copy;/gi, "©")
    txtS = txtS.replace(/(\(r\)|\&reg;)/gi, "®")
    txtS = txtS.replace(/(\((tm|тм)\)|\&trade;)/gi, "™")
    txtS = txtS.replace(/(\(p\)|\&sect;)/gi, "§")
    txtS = txtS.replace(/\&euro;/gi, "€")
    txtS = txtS.replace(/\&yen;/gi, "¥")
    txtS = txtS.replace(/\&pound;/gi, "£")
    //======================================
    // UZBEK01
    txtS = txtS.replace(/(O|o|G|g)\`/g, "$1ʻ")
    txtS = txtS.replace(/(A|a|E|e|N|n|T|t)\`/g, "$1ʼ")
    txtS = txtS.replace(/(O|o|G|g)\ʼ/g, "$1ʻ")
    txtS = txtS.replace(/(A|a|E|e|N|n|T|t)\ʻ/g, "$1ʼ")
    txtS = txtS.replace(/(O|o|G|g)\’/g, "$1ʻ")
    txtS = txtS.replace(/(A|a|E|e|N|n|T|t)\’/g, "$1ʼ")
    //======================================
    // Cyr - Lat ala Uzbek
    txtS = txtS.replace(/(б|в|г|д|ж|з|к|л|м|н|п|р|с|т|ф|х|ц|ч|ш|щ|,|:)\е/g, "$1e")
    txtS = txtS.replace(/(а|е|ё|и|о|у|э|ю|я|,|:)\ц/g, "$1ts")
    txtS = txtS.replace(/(ц)/g, "s")
    txtS = txtS.replace(/(е)/g, "e")
    txtS = txtS.replace(/(ъ)/g, "ʼ")
    txtS = txtS.replace(/(Ты)/g, "Ti")
    txtS = txtS.replace(/(ты)/g, "ti")
    txtS = txtS.replace(/(Ё)/g, "Yo")
    txtS = txtS.replace(/(ё)/g, "yo")
    txtS = txtS.replace(/(Сентябрь)/g, "sentabr")
    txtS = txtS.replace(/(Октябрь)/g, "oktabr")
    txtS = txtS.replace(/(сентябрь)/g, "sentabr")
    txtS = txtS.replace(/(октябрь)/g, "oktabr")
    txtS = txtS.replace(/(Сентябр)/g, "sentabr")
    txtS = txtS.replace(/(Октябр)/g, "oktabr")
    txtS = txtS.replace(/(сентябр)/g, "sentabr")
    txtS = txtS.replace(/(октябр)/g, "oktabr")
    txtS = txtS.replace(/(Ж)/g, "J")
    txtS = txtS.replace(/(ж)/g, "j")
    txtS = txtS.replace(/(а)/g, "a")
    txtS = txtS.replace(/(# REDIRECT)/g, "#YOʻNALTIR")
    txtS = txtS.replace(/(Yashil burun)/g, "Qizil burun")
    txtS = txtS.replace(/(Б)/g, "B")
    txtS = txtS.replace(/(в)/g, "v")
    txtS = txtS.replace(/(В)/g, "V")
    txtS = txtS.replace(/(г)/g, "g")
    txtS = txtS.replace(/(Г)/g, "G")
    txtS = txtS.replace(/(ғ)/g, "gʻ")
    txtS = txtS.replace(/(Ғ)/g, "Gʻ")
    txtS = txtS.replace(/(д)/g, "d")
    txtS = txtS.replace(/(Д)/g, "D")
    txtS = txtS.replace(/(е)/g, "e")
    txtS = txtS.replace(/(Е)/g, "Ye")
    txtS = txtS.replace(/(з)/g, "z")
    txtS = txtS.replace(/(З)/g, "Z")
    txtS = txtS.replace(/(и)/g, "i")
    txtS = txtS.replace(/(И)/g, "I")
    txtS = txtS.replace(/(й)/g, "y")
    txtS = txtS.replace(/(Й)/g, "Y")
    txtS = txtS.replace(/(к)/g, "k")
    txtS = txtS.replace(/(К)/g, "K")
    txtS = txtS.replace(/(қ)/g, "q")
    txtS = txtS.replace(/(Қ)/g, "Q")
    txtS = txtS.replace(/(л)/g, "l")
    txtS = txtS.replace(/(Л)/g, "L")
    txtS = txtS.replace(/(м)/g, "m")
    txtS = txtS.replace(/(М)/g, "M")
    txtS = txtS.replace(/(н)/g, "n")
    txtS = txtS.replace(/(Н)/g, "N")
    txtS = txtS.replace(/(о)/g, "o")
    txtS = txtS.replace(/(О)/g, "O")
    txtS = txtS.replace(/(п)/g, "p")
    txtS = txtS.replace(/(П)/g, "P")
    txtS = txtS.replace(/(р)/g, "r")
    txtS = txtS.replace(/(Р)/g, "R")
    txtS = txtS.replace(/(с)/g, "s")
    txtS = txtS.replace(/(С)/g, "S")
    txtS = txtS.replace(/(т)/g, "t")
    txtS = txtS.replace(/(Т)/g, "T")
    txtS = txtS.replace(/(у)/g, "u")
    txtS = txtS.replace(/(У)/g, "U")
    txtS = txtS.replace(/(ў)/g, "oʻ")
    txtS = txtS.replace(/(Ў)/g, "Oʻ")
    txtS = txtS.replace(/(ф)/g, "f")
    txtS = txtS.replace(/(Ф)/g, "F")
    txtS = txtS.replace(/(х)/g, "x")
    txtS = txtS.replace(/(Х)/g, "X")
    txtS = txtS.replace(/(ҳ)/g, "h")
    txtS = txtS.replace(/(Ҳ)/g, "H")
    txtS = txtS.replace(/(ц)/g, "s")
    txtS = txtS.replace(/(Ц)/g, "Ts")
    txtS = txtS.replace(/(Ч)/g, "Ch")
    txtS = txtS.replace(/(ч)/g, "ch")
    txtS = txtS.replace(/(Ш)/g, "Sh")
    txtS = txtS.replace(/(ш)/g, "sh")
    txtS = txtS.replace(/(ы)/g, "i")
    txtS = txtS.replace(/(Ы)/g, "I")
    txtS = txtS.replace(/(Ь)/g, "")
    txtS = txtS.replace(/(ь)/g, "")
    txtS = txtS.replace(/(Э)/g, "E")
    txtS = txtS.replace(/(э)/g, "e")
    txtS = txtS.replace(/(Ю)/g, "Yu")
    txtS = txtS.replace(/(ю)/g, "yu")
    txtS = txtS.replace(/(Я)/g, "Ya")
    txtS = txtS.replace(/(я)/g, "ya")

    //======================================
    // Correct the reductions
    txtS = txtS.replace(/(\d)(mln|mlrd|trln|mln\.|mlrd\.|trln\.|million|milliard|trillion)([^A-Za-z])/g, "$1\u00A0$2$3")
    // Insert missing and delete unnecessary spaces
    txtS = txtS.replace(/([A-Z]\.) ?([A-Z]\.) ?([A-Z][a-z])/g, "$1\u00A0$2\u00A0$3")
    txtS = txtS.replace(/([A-Z]\.)([A-Z]\.)/g, "$1 $2")
    txtS = txtS.replace(/^([#\*:]+)([ \t\f\v]*)([^ \t\f\v\*#:])/gm, "$1 $3")
    txtS = txtS.replace(/([a-z])(\.)([А-ЯA-Z])/g, "$1$2 $3")
    txtS = txtS.replace(/([а-яa-z\)\»\“\"\]])(\s*)(\,)([а-яa-z\(\«\„\"\[])/g, "$1$3 $4")
    txtS = txtS.replace(/([а-яa-z\)\»\“\"\]])(\s)([\,\;])(\s)([а-яa-z\(\«\„\"\[])/g, "$1$3 $5")
    txtS = txtS.replace(/([^%\/\w]\d+?(?:[.,]\d+?)?) ?([%‰])(?!-[A-Za-zʻʼ])/g, "$1$2") // 15 % → 15%
    txtS = txtS.replace(/([№§])(\s*)(\d)/g, "$1\u00A0$3")
    txtS = txtS.replace(/(^|[^ \t])([ \t]+)($|\n)/gm, "$1$3")
    txtS = txtS.replace(/(\()( +)/g, "$1");
    txtS = txtS.replace(/( +)(\))/g, "$2");
    //======================================
    // Avoid double spaces
    txtS = txtS.substr(1, txtS.length - 1);
    txtS = txtS.replace(/(\S)([ \t]{2,})([\S\r])/g, "$1 $3")
    txtS = " " + txtS
    //======================================
    // Replace double quotes ("")  with double angle quotes («»)
    //txtS = txtS.replace(/([\x01-(\s\|\"]|\/|\+)(\")([^\"]{0,})([^\s\"(])(\")/g, "$1«\$3\$4»")
    // Quotations in quotes
    if (/"/.test(txtS)) {
        txtS = txtS.replace(/([\x01(\s\"])(\")([^\"]{0,})([^\s\"(])(\")/g, "\$1„\$3\$4“")
        while (/(«)([^»]*)(«)/.test(txtS))
            txtS = txtS.replace(/(«)([^»]*)(«)([^»]*)(»)/g, "\$1\$2„\$4“")
    }

}


function addWkikifPanel() {
    var wf = '<a href="javascript:Wikify();" title="Vikifikatsiya qilish" style="text-decoration: none;color:#000; font-weight:bold; font-size:16px; border:solid 1px #4444FF; background: #aabbff !important; padding: 1px 4px !important;" accesskey="w">Vikifikator 2</a></span><br>';

    /*var d = document;
    if (d.getElementById('wpSummaryLabel')) {
        var wps = d.getElementById('wpSummaryLabel').getElementsByTagName('span')[0];
        if (wps) {
            wps.innerHTML = wf + wps.innerHTML;
        }
    }*/
    //$('.editOptions').before(wf);
    var $editTools = $('.mw-editTools');
    $('.editOptions').before($editTools);
    $('#wikificatorPlaceHolder').append(wf);

    oldSel = document.getElementById('specialchars');
    if (oldSel) oldSel.innerHTML = '';
}

// Вставляет стаб, выбранный из списка
function insertStub(obj) {
    var id = obj.options[obj.selectedIndex].value;
    if (id != '0') insertTags(t[id][0], t[id][2], t[id][1]);
    obj.selectedIndex = 0;
}

$(document).ready(addWkikifPanel);
*/
/* </pre> */