input box trans

This commit is contained in:
Gabe Yuan
2023-09-13 23:24:55 +08:00
parent 556fd71275
commit 14ca13e31d
4 changed files with 43 additions and 26 deletions

View File

@@ -296,10 +296,11 @@ export class Translator {
}
timer = setInterval(() => {
const loadingText = `${text} ${"-\\|/"[++num % 4]} `;
if (this._inputNodeNames.includes(node.nodeName)) {
node.value = text + "-\\|/"[++num % 4];
node.value = loadingText;
} else {
node.textContent = text + "-\\|/"[++num % 4];
node.textContent = loadingText;
}
}, 200);