fix bug in script
This commit is contained in:
parent
8f95ae6d29
commit
ac3787e10a
@ -14,7 +14,7 @@
|
||||
<div class="content">
|
||||
<div class="wrap">
|
||||
<textarea id="one" rows="3" placeholder="Paste fail layout text" onchange="layoutReplace()"></textarea>
|
||||
<button>q > й</button>
|
||||
<button onclick="layoutReplace()">q > й</button>
|
||||
<textarea id="two" rows="3" disabled="disabled"></textarea>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -2,7 +2,7 @@ function layoutReplace()
|
||||
{
|
||||
'use strict';
|
||||
|
||||
keys = {
|
||||
let keys = {
|
||||
"q":"й", "w":"ц", "e":"у", "r":"к", "t":"е", "y":"н", "u":"г",
|
||||
"i":"ш", "o":"щ", "p":"з", "[":"х", "]":"ъ", "a":"ф", "s":"ы",
|
||||
"d":"в", "f":"а", "g":"п", "h":"р", "j":"о", "k":"л", "l":"д",
|
||||
@ -14,9 +14,6 @@ function layoutReplace()
|
||||
let outputText = document.getElementById("two");
|
||||
let text = null;
|
||||
|
||||
console.log(inputText);
|
||||
|
||||
|
||||
text = inputText.replace(/[A-z/,.;\'\]\[]/g, function(x) {
|
||||
return x == x.toLowerCase() ? keys[ x ] : keys[ x.toLowerCase() ].toUpperCase();
|
||||
});
|
||||
|
Loading…
Reference in New Issue
Block a user