Ensure plaintext is always first
This commit is contained in:
parent
14501a6d09
commit
56bc0a8b08
2 changed files with 6 additions and 1 deletions
|
@ -36,7 +36,7 @@
|
|||
<div id="length">Waiting...</div>
|
||||
|
||||
<div id="info">
|
||||
v2.2.0 | © Nicd 2022 | <a href="https://gitlab.com/Nicd/t" target="_blank">Source</a> | <a href="./licenses.txt"
|
||||
v2.2.1 | © Nicd 2023 | <a href="https://gitlab.com/Nicd/t" target="_blank">Source</a> | <a href="./licenses.txt"
|
||||
target="_blank">Licenses</a>
|
||||
</div>
|
||||
</footer>
|
||||
|
|
|
@ -74,6 +74,11 @@ function getLanguageClassName(language) {
|
|||
function renderLanguageOptions() {
|
||||
const languages = [...LANGUAGE_NAMES];
|
||||
languages.sort();
|
||||
|
||||
// Plain text must be first
|
||||
languages.splice(languages.indexOf(PLAINTEXT), 1);
|
||||
languages.unshift(PLAINTEXT);
|
||||
|
||||
for (const language of languages) {
|
||||
const option = document.createElement("option");
|
||||
option.value = language;
|
||||
|
|
Loading…
Reference in a new issue