feat: add translate interval setting

This commit is contained in:
Gabe Yuan
2024-03-17 12:09:32 +08:00
parent 61ef5df559
commit 75830aaea7
3 changed files with 21 additions and 1 deletions

View File

@@ -430,10 +430,13 @@ export class Translator {
_reTranslate = debounce(() => {
if (this._rule.transOpen === "true") {
window.removeEventListener("keydown", this._handleKeydown);
this._mutaObserver.disconnect();
this._interseObserver.disconnect();
this._removeInjector();
this._register();
}
}, 500);
}, this._setting.transInterval);
_invalidLength = (q) =>
!q ||