Skip to content

Commit

Permalink
add erang keyboard
Browse files Browse the repository at this point in the history
  • Loading branch information
junhg0211 committed Feb 25, 2024
1 parent 18d771a commit cf0415d
Show file tree
Hide file tree
Showing 5 changed files with 1,971 additions and 1,581 deletions.
18 changes: 18 additions & 0 deletions converter.js
Original file line number Diff line number Diff line change
Expand Up @@ -67,3 +67,21 @@ function rusimez(string) {

return string;
}

const erangLatin = '1234567890-qwertyuiopasdfghjklzxcvbnm,.!@#$%^&*()_QWERTYUIOPASDFGHJKLZXCVBNM<>';
const erangErang = '';
function erang(string) {
let result = '';
for (let i = 0; i < string.length; i++) {
let letter = string[i];
let index = erangLatin.indexOf(letter);

if (index === -1) {
result += letter;
} else {
result += erangErang[index];
}
}

return result;
}
1 change: 1 addition & 0 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ <h1><strong>Sapota</strong> Converter</h1>
<select name="language" id="language" class="form-select">
<option value="Zemin">Zemin</option>
<option value="Rusimez">Rusimez</option>
<option value="Erang">Erang</option>
</select>
</p>
<p>
Expand Down
2 changes: 2 additions & 0 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,8 @@ function keyup() {
textarea.value = zasok(textarea.value);
} else if (languageSelect.value === 'Rusimez') {
textarea.value = rusimez(textarea.value);
} else if (languageSelect.value === 'Erang') {
textarea.value = erang(textarea.value);
}
}

Expand Down
Loading

0 comments on commit cf0415d

Please sign in to comment.