<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="ru">
	<id>https://ejwiki.org/index.php?action=history&amp;feed=atom&amp;title=MediaWiki%3AGadget-Translit.js</id>
	<title>MediaWiki:Gadget-Translit.js - История изменений</title>
	<link rel="self" type="application/atom+xml" href="https://ejwiki.org/index.php?action=history&amp;feed=atom&amp;title=MediaWiki%3AGadget-Translit.js"/>
	<link rel="alternate" type="text/html" href="https://ejwiki.org/index.php?title=MediaWiki:Gadget-Translit.js&amp;action=history"/>
	<updated>2026-05-14T20:32:58Z</updated>
	<subtitle>История изменений этой страницы в вики</subtitle>
	<generator>MediaWiki 1.42.3</generator>
	<entry>
		<id>https://ejwiki.org/index.php?title=MediaWiki:Gadget-Translit.js&amp;diff=31584&amp;oldid=prev</id>
		<title>Ariely: переименовал «MediaWiki:Translit.js» в «MediaWiki:Gadget-Translit.js»</title>
		<link rel="alternate" type="text/html" href="https://ejwiki.org/index.php?title=MediaWiki:Gadget-Translit.js&amp;diff=31584&amp;oldid=prev"/>
		<updated>2010-04-01T19:39:40Z</updated>

		<summary type="html">&lt;p&gt;переименовал «&lt;a href=&quot;/index.php/MediaWiki:Translit.js&quot; title=&quot;MediaWiki:Translit.js&quot;&gt;MediaWiki:Translit.js&lt;/a&gt;» в «&lt;a href=&quot;/index.php/MediaWiki:Gadget-Translit.js&quot; title=&quot;MediaWiki:Gadget-Translit.js&quot;&gt;MediaWiki:Gadget-Translit.js&lt;/a&gt;»&lt;/p&gt;
&lt;p&gt;&lt;b&gt;Новая страница&lt;/b&gt;&lt;/p&gt;&lt;div&gt;//Транслитерация выделенного текста из латиницы в кириллицу.&lt;br /&gt;
//Часть кода позаимствована из http://ru.wikipedia.org/wiki/MediaWiki:Wikificator.js&lt;br /&gt;
//Автор: X-romix&lt;br /&gt;
 &lt;br /&gt;
var XRomix_Translit_CantWork = &amp;#039;Транслит не может работать в вашем браузере.\n\nTranslit cannot work in your browser&amp;#039; // английский текст для тех, кто не видит русские буквы&lt;br /&gt;
var XRomix_Translit_FullText = &amp;#039;Эта кнопка предназначена для транслитерации текста. Выберите фрагмент текста. Используется стандарт ГОСТ 7.79-2000 (ИСО 9-95), в котором ряд символов представлены с использованием обратного апострофа (рядом с клавишей Esc). Заглавные символы Ь и Ъ кодируются ~ и ~~ соответственно, подсказка по остальным символам будет выведена внизу окна.&amp;#039;;&lt;br /&gt;
 &lt;br /&gt;
//Добавляет кнопку&lt;br /&gt;
function addTranslitButton(){&lt;br /&gt;
	var toolbar = document.getElementById(&amp;#039;toolbar&amp;#039;)&lt;br /&gt;
	var textbox = document.getElementById(&amp;#039;wpTextbox1&amp;#039;)&lt;br /&gt;
	if (!textbox || !toolbar) return&lt;br /&gt;
	var i = document.createElement(&amp;#039;img&amp;#039;)&lt;br /&gt;
	i.src = &amp;#039;http://upload.wikimedia.org/wikipedia/ru/0/0a/Button-translit.PNG&amp;#039;&lt;br /&gt;
	i.alt = i.title = &amp;#039;Транслит&amp;#039;&lt;br /&gt;
	i.onclick = XRomix_Translit&lt;br /&gt;
	i.style.cursor = &amp;#039;pointer&amp;#039;&lt;br /&gt;
	toolbar.appendChild(i)&lt;br /&gt;
 &lt;br /&gt;
} &lt;br /&gt;
 &lt;br /&gt;
//Этот код выполняется в начале.&lt;br /&gt;
if (wgAction == &amp;#039;edit&amp;#039; || wgAction == &amp;#039;submit&amp;#039;){&lt;br /&gt;
  addOnloadHook(addTranslitButton)&lt;br /&gt;
}&lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
//Функция для оформления таблицы&lt;br /&gt;
function XRomix_Translit(){&lt;br /&gt;
 &lt;br /&gt;
 //Проверяем, поддерживает ли браузер регулярные выражения (RegExp)	&lt;br /&gt;
 if ((&amp;#039;code&amp;#039;.replace(/d/g, &amp;#039;r&amp;#039;) != &amp;#039;core&amp;#039;) &lt;br /&gt;
    || (navigator.appName==&amp;#039;Netscape&amp;#039; &amp;amp;&amp;amp; navigator.appVersion.substr (0, 1) &amp;lt; 5))&lt;br /&gt;
  { alert(XRomix_Translit_CantWork); return }&lt;br /&gt;
 &lt;br /&gt;
 var txt, hidden = [], hidIdx = 0, wpTextbox1 = document.editform.wpTextbox1&lt;br /&gt;
 var winScroll = document.documentElement.scrollTop //remember window scroll&lt;br /&gt;
 wpTextbox1.focus()&lt;br /&gt;
 &lt;br /&gt;
 if (typeof wpTextbox1.selectionStart != &amp;#039;undefined&amp;#039; &lt;br /&gt;
    &amp;amp;&amp;amp; (navigator.productSub &amp;gt; 20031000 || is_safari)) { //Mozilla/Opera/Safari3&lt;br /&gt;
 &lt;br /&gt;
    var textScroll = wpTextbox1.scrollTop&lt;br /&gt;
    var startPos = wpTextbox1.selectionStart&lt;br /&gt;
    var endPos = wpTextbox1.selectionEnd&lt;br /&gt;
    txt = wpTextbox1.value.substring(startPos, endPos)&lt;br /&gt;
    if (txt == &amp;#039;&amp;#039;) {alert(XRomix_Translit_FullText); ShowHelp(); return}&lt;br /&gt;
    else{&lt;br /&gt;
 &lt;br /&gt;
	  processText()&lt;br /&gt;
      wpTextbox1.value = wpTextbox1.value.substring(0, startPos) + txt + wpTextbox1.value.substring(endPos)&lt;br /&gt;
    }&lt;br /&gt;
    wpTextbox1.selectionStart = startPos&lt;br /&gt;
    wpTextbox1.selectionEnd = startPos + txt.length&lt;br /&gt;
    wpTextbox1.scrollTop = textScroll&lt;br /&gt;
 &lt;br /&gt;
 }else if (document.selection &amp;amp;&amp;amp; document.selection.createRange) { //IE&lt;br /&gt;
 	 //alert(&amp;quot;IE&amp;quot;);&lt;br /&gt;
 &lt;br /&gt;
   var range = document.selection.createRange()&lt;br /&gt;
   txt = range.text&lt;br /&gt;
   if (txt == &amp;#039;&amp;#039;) {alert(XRomix_Translit_FullText); ShowHelp(); return}&lt;br /&gt;
   else{&lt;br /&gt;
 &lt;br /&gt;
     processText()&lt;br /&gt;
	  range.text = txt&lt;br /&gt;
     //if (!window.opera) txt = txt.replace(/\r/g,&amp;#039;&amp;#039;)&lt;br /&gt;
     if (range.moveStart) range.moveStart(&amp;#039;character&amp;#039;, - txt.length)&lt;br /&gt;
     range.select() &lt;br /&gt;
   }&lt;br /&gt;
 &lt;br /&gt;
 }else // Для браузеров, которые не умеют возвращать выделенный фрагмент, выдаем ошибку&lt;br /&gt;
   { alert(XRomix_Translit_CantWork); return }&lt;br /&gt;
 &lt;br /&gt;
 document.documentElement.scrollTop = winScroll // scroll back, for IE/Opera&lt;br /&gt;
 &lt;br /&gt;
	//Здесь производим замену в переменной txt - это отразится на выделенном фрагменте текста &lt;br /&gt;
	function processText(){&lt;br /&gt;
	  //txt = txt.replace(/^\s+|\s+$/g, &amp;#039;&amp;#039;)  //Обрезаем пробелы слева и справа&lt;br /&gt;
	  //txt = txt.replace(/\n/g, &amp;#039;\n|-\n| &amp;#039;) //Концы строк&lt;br /&gt;
	  &lt;br /&gt;
	  //a b v g d e yo zh z i j k l m n o p r s t u f x c ch sh shh `` y` ` e` yu ya&lt;br /&gt;
	  &lt;br /&gt;
	  txt = txt.replace(/~~/g, &amp;#039;Ъ&amp;#039;); &lt;br /&gt;
	  txt = txt.replace(/~/g, &amp;#039;Ь&amp;#039;); &lt;br /&gt;
	  &lt;br /&gt;
	  txt = txt.replace(/shh/g, &amp;#039;щ&amp;#039;); &lt;br /&gt;
	  txt = txt.replace(/Shh/g, &amp;#039;Щ&amp;#039;); &lt;br /&gt;
	  txt = txt.replace(/SHH/g, &amp;#039;Щ&amp;#039;); &lt;br /&gt;
	  &lt;br /&gt;
	  &lt;br /&gt;
	  &lt;br /&gt;
	  txt = txt.replace(/yo/g, &amp;#039;ё&amp;#039;); &lt;br /&gt;
	  txt = txt.replace(/zh/g, &amp;#039;ж&amp;#039;); &lt;br /&gt;
	  txt = txt.replace(/cz/g, &amp;#039;ц&amp;#039;); &lt;br /&gt;
	  txt = txt.replace(/ch/g, &amp;#039;ч&amp;#039;); &lt;br /&gt;
	  txt = txt.replace(/sh/g, &amp;#039;ш&amp;#039;); &lt;br /&gt;
	  txt = txt.replace(/``/g, &amp;#039;ъ&amp;#039;); &lt;br /&gt;
	  txt = txt.replace(/y`/g, &amp;#039;ы&amp;#039;); &lt;br /&gt;
	  txt = txt.replace(/e`/g, &amp;#039;э&amp;#039;); &lt;br /&gt;
	  txt = txt.replace(/yu/g, &amp;#039;ю&amp;#039;); &lt;br /&gt;
	  txt = txt.replace(/ya/g, &amp;#039;я&amp;#039;); &lt;br /&gt;
	    &lt;br /&gt;
	  txt = txt.replace(/Yo/g, &amp;#039;Ё&amp;#039;); &lt;br /&gt;
	  txt = txt.replace(/Zh/g, &amp;#039;Ж&amp;#039;); &lt;br /&gt;
	  txt = txt.replace(/Cz/g, &amp;#039;Ц&amp;#039;); &lt;br /&gt;
	  txt = txt.replace(/Ch/g, &amp;#039;Ч&amp;#039;); &lt;br /&gt;
	  txt = txt.replace(/Sh/g, &amp;#039;Ш&amp;#039;); &lt;br /&gt;
	  txt = txt.replace(/Y`/g, &amp;#039;Ы&amp;#039;); &lt;br /&gt;
	  txt = txt.replace(/E`/g, &amp;#039;Э&amp;#039;); &lt;br /&gt;
	  txt = txt.replace(/Yu/g, &amp;#039;Ю&amp;#039;); &lt;br /&gt;
	  txt = txt.replace(/Ya/g, &amp;#039;Я&amp;#039;); &lt;br /&gt;
	  &lt;br /&gt;
	  txt = txt.replace(/YO/g, &amp;#039;Ё&amp;#039;); &lt;br /&gt;
	  txt = txt.replace(/ZH/g, &amp;#039;Ж&amp;#039;); &lt;br /&gt;
	  txt = txt.replace(/CZ/g, &amp;#039;Ц&amp;#039;); &lt;br /&gt;
	  txt = txt.replace(/CH/g, &amp;#039;Ч&amp;#039;); &lt;br /&gt;
	  txt = txt.replace(/SH/g, &amp;#039;Ш&amp;#039;); &lt;br /&gt;
	  txt = txt.replace(/YU/g, &amp;#039;Ю&amp;#039;); &lt;br /&gt;
	  txt = txt.replace(/YA/g, &amp;#039;Я&amp;#039;); &lt;br /&gt;
	  &lt;br /&gt;
&lt;br /&gt;
	  txt = txt.replace(/a/g, &amp;#039;а&amp;#039;); &lt;br /&gt;
	  txt = txt.replace(/b/g, &amp;#039;б&amp;#039;); &lt;br /&gt;
	  txt = txt.replace(/v/g, &amp;#039;в&amp;#039;); &lt;br /&gt;
	  txt = txt.replace(/g/g, &amp;#039;г&amp;#039;); &lt;br /&gt;
	  txt = txt.replace(/d/g, &amp;#039;д&amp;#039;); &lt;br /&gt;
	  txt = txt.replace(/e/g, &amp;#039;е&amp;#039;); &lt;br /&gt;
	  txt = txt.replace(/z/g, &amp;#039;з&amp;#039;); &lt;br /&gt;
	  txt = txt.replace(/i/g, &amp;#039;и&amp;#039;); &lt;br /&gt;
	  txt = txt.replace(/j/g, &amp;#039;й&amp;#039;); &lt;br /&gt;
	  txt = txt.replace(/k/g, &amp;#039;к&amp;#039;); &lt;br /&gt;
	  txt = txt.replace(/l/g, &amp;#039;л&amp;#039;); &lt;br /&gt;
	  txt = txt.replace(/m/g, &amp;#039;м&amp;#039;); &lt;br /&gt;
	  txt = txt.replace(/n/g, &amp;#039;н&amp;#039;); &lt;br /&gt;
	  txt = txt.replace(/o/g, &amp;#039;о&amp;#039;); &lt;br /&gt;
	  txt = txt.replace(/p/g, &amp;#039;п&amp;#039;); &lt;br /&gt;
	  txt = txt.replace(/r/g, &amp;#039;р&amp;#039;); &lt;br /&gt;
	  txt = txt.replace(/s/g, &amp;#039;с&amp;#039;); &lt;br /&gt;
	  txt = txt.replace(/t/g, &amp;#039;т&amp;#039;); &lt;br /&gt;
	  txt = txt.replace(/u/g, &amp;#039;у&amp;#039;); &lt;br /&gt;
	  txt = txt.replace(/f/g, &amp;#039;ф&amp;#039;); &lt;br /&gt;
	  txt = txt.replace(/x/g, &amp;#039;х&amp;#039;); &lt;br /&gt;
	  txt = txt.replace(/c/g, &amp;#039;ц&amp;#039;); &lt;br /&gt;
	  txt = txt.replace(/`/g, &amp;#039;ь&amp;#039;); &lt;br /&gt;
&lt;br /&gt;
	  txt = txt.replace(/A/g, &amp;#039;А&amp;#039;); &lt;br /&gt;
	  txt = txt.replace(/B/g, &amp;#039;Б&amp;#039;); &lt;br /&gt;
	  txt = txt.replace(/V/g, &amp;#039;В&amp;#039;); &lt;br /&gt;
	  txt = txt.replace(/G/g, &amp;#039;Г&amp;#039;); &lt;br /&gt;
	  txt = txt.replace(/D/g, &amp;#039;Д&amp;#039;); &lt;br /&gt;
	  txt = txt.replace(/E/g, &amp;#039;Е&amp;#039;); &lt;br /&gt;
	  txt = txt.replace(/Z/g, &amp;#039;З&amp;#039;); &lt;br /&gt;
	  txt = txt.replace(/I/g, &amp;#039;И&amp;#039;); &lt;br /&gt;
	  txt = txt.replace(/J/g, &amp;#039;Й&amp;#039;); &lt;br /&gt;
	  txt = txt.replace(/K/g, &amp;#039;К&amp;#039;); &lt;br /&gt;
	  txt = txt.replace(/L/g, &amp;#039;Л&amp;#039;); &lt;br /&gt;
	  txt = txt.replace(/M/g, &amp;#039;М&amp;#039;); &lt;br /&gt;
	  txt = txt.replace(/N/g, &amp;#039;Н&amp;#039;); &lt;br /&gt;
	  txt = txt.replace(/O/g, &amp;#039;О&amp;#039;); &lt;br /&gt;
	  txt = txt.replace(/P/g, &amp;#039;П&amp;#039;); &lt;br /&gt;
	  txt = txt.replace(/R/g, &amp;#039;Р&amp;#039;); &lt;br /&gt;
	  txt = txt.replace(/S/g, &amp;#039;С&amp;#039;); &lt;br /&gt;
	  txt = txt.replace(/T/g, &amp;#039;Т&amp;#039;); &lt;br /&gt;
	  txt = txt.replace(/U/g, &amp;#039;У&amp;#039;); &lt;br /&gt;
	  txt = txt.replace(/F/g, &amp;#039;Ф&amp;#039;); &lt;br /&gt;
	  txt = txt.replace(/X/g, &amp;#039;Х&amp;#039;); &lt;br /&gt;
	  txt = txt.replace(/C/g, &amp;#039;Ц&amp;#039;); &lt;br /&gt;
	 &lt;br /&gt;
	  setWpSummary();&lt;br /&gt;
	}	&lt;br /&gt;
&lt;br /&gt;
	function ShowHelp(){&lt;br /&gt;
&lt;br /&gt;
	 var select, inputId, isEdit,  maxChars = 250, useMWPreview&lt;br /&gt;
	 &lt;br /&gt;
	 if (wgAction == &amp;#039;edit&amp;#039; || wgAction == &amp;#039;submit&amp;#039;){&lt;br /&gt;
	   inputId = &amp;#039;wpSummary&amp;#039;&lt;br /&gt;
	 }else if (wgCanonicalNamespace == &amp;#039;Special&amp;#039; &amp;amp;&amp;amp; wgCanonicalSpecialPageName == &amp;#039;Movepage&amp;#039;){&lt;br /&gt;
	   inputId = &amp;#039;wpReason&amp;#039;&lt;br /&gt;
	  }else if (wgAction == &amp;#039;protect&amp;#039;){&lt;br /&gt;
	   inputId = &amp;#039;mwProtect-reason&amp;#039;&lt;br /&gt;
	 }else return&lt;br /&gt;
&lt;br /&gt;
	 var hlp = document.getElementById(&amp;quot;translit_help&amp;quot;)&lt;br /&gt;
	 if (hlp) return&lt;br /&gt;
	 &lt;br /&gt;
	 var input = document.getElementById(inputId)&lt;br /&gt;
	 if (!input) return&lt;br /&gt;
	 &lt;br /&gt;
	 //create counter span&lt;br /&gt;
	 var cnt = document.createElement(&amp;#039;span&amp;#039;)&lt;br /&gt;
	 cnt.id = &amp;#039;inputCounter&amp;#039;&lt;br /&gt;
	 cnt.style.marginLeft = &amp;#039;3px&amp;#039;&lt;br /&gt;
	 input.parentNode.insertBefore(cnt, input.nextSibling)&lt;br /&gt;
	 &lt;br /&gt;
	 cnt.innerHTML = &amp;#039;&amp;lt;table class=&amp;quot;standard&amp;quot; id=&amp;quot;translit_help&amp;quot;&amp;gt;\&lt;br /&gt;
	&amp;lt;tr&amp;gt;\&lt;br /&gt;
	&amp;lt;th&amp;gt;А&amp;lt;th&amp;gt;Б&amp;lt;th&amp;gt;В&amp;lt;th&amp;gt;Г&amp;lt;th&amp;gt;Д&amp;lt;th&amp;gt;Е&amp;lt;th&amp;gt;Ё&amp;lt;th&amp;gt;Ж&amp;lt;th&amp;gt;З&amp;lt;th&amp;gt;И&amp;lt;th&amp;gt;Й&amp;lt;th&amp;gt;К&amp;lt;th&amp;gt;Л&amp;lt;th&amp;gt;М&amp;lt;th&amp;gt;Н&amp;lt;th&amp;gt;О&amp;lt;th&amp;gt;П&amp;lt;th&amp;gt;Р&amp;lt;th&amp;gt;С&amp;lt;th&amp;gt;Т&amp;lt;th&amp;gt;У&amp;lt;th&amp;gt;Ф&amp;lt;th&amp;gt;Х&amp;lt;th&amp;gt;Ц&amp;lt;th&amp;gt;Ч&amp;lt;th&amp;gt;Ш&amp;lt;th&amp;gt;Щ&amp;lt;th&amp;gt;Ъ&amp;lt;th&amp;gt;Ы&amp;lt;th&amp;gt;Ь&amp;lt;th&amp;gt;Э&amp;lt;th&amp;gt;Ю&amp;lt;th&amp;gt;Я\&lt;br /&gt;
	&amp;lt;/tr&amp;gt;\&lt;br /&gt;
	&amp;lt;tr&amp;gt;\&lt;br /&gt;
	&amp;lt;td&amp;gt;а&amp;lt;td&amp;gt;b&amp;lt;td&amp;gt;v&amp;lt;td&amp;gt;g&amp;lt;td&amp;gt;d&amp;lt;td&amp;gt;e&amp;lt;td&amp;gt;yo&amp;lt;td&amp;gt;zh&amp;lt;td&amp;gt;z&amp;lt;td&amp;gt;i&amp;lt;td&amp;gt;j&amp;lt;td&amp;gt;k&amp;lt;td&amp;gt;l&amp;lt;td&amp;gt;m&amp;lt;td&amp;gt;n&amp;lt;td&amp;gt;о&amp;lt;td&amp;gt;p&amp;lt;td&amp;gt;r&amp;lt;td&amp;gt;s&amp;lt;td&amp;gt;t&amp;lt;td&amp;gt;u&amp;lt;td&amp;gt;f&amp;lt;td&amp;gt;x&amp;lt;td&amp;gt;cz, с&amp;lt;td&amp;gt;ch&amp;lt;td&amp;gt;sh&amp;lt;td&amp;gt;shh&amp;lt;td&amp;gt;``&amp;lt;td&amp;gt;y`&amp;lt;td&amp;gt;`&amp;lt;td&amp;gt;e`&amp;lt;td&amp;gt;yu&amp;lt;td&amp;gt;уа\&lt;br /&gt;
	&amp;lt;/tr&amp;gt;&amp;lt;/table&amp;gt;&amp;#039;;&lt;br /&gt;
&lt;br /&gt;
	  &lt;br /&gt;
	} &lt;br /&gt;
	&lt;br /&gt;
  function setWpSummary(){&lt;br /&gt;
     var wpSummary = document.getElementById(&amp;#039;wpSummary&amp;#039;)&lt;br /&gt;
	 if(wpSummary){&lt;br /&gt;
	    var temp=wpSummary.value;&lt;br /&gt;
	    temp=temp.replace(/\/\*.*?\*\// , &amp;quot;&amp;quot;); //комментарии&lt;br /&gt;
	    temp=temp.replace(/[\s]*/ , &amp;quot;&amp;quot;); //пробелы&lt;br /&gt;
	    if (temp==&amp;quot;&amp;quot;){&lt;br /&gt;
	       wpSummary.value=wpSummary.value+&amp;quot; - [[User talk:X-romix/translit.js|translit.js]] - транслит&amp;quot;;&lt;br /&gt;
	    }&lt;br /&gt;
	 }&lt;br /&gt;
  }&lt;br /&gt;
 &lt;br /&gt;
}&lt;/div&gt;</summary>
		<author><name>Ariely</name></author>
	</entry>
</feed>