opt: Optimize subtitle processing logic

This commit is contained in:
Gabe
2025-11-02 00:15:38 +08:00
parent 7481d65e1e
commit ed4275a18b

View File

@@ -59,6 +59,7 @@ export class BilingualSubtitleManager {
destroy() {
logger.info("Bilingual Subtitle Manager: Destroying...");
this.#removeEventListeners();
this.#throttledTriggerTranslations?.cancel();
this.#captionWindowEl?.parentElement?.parentElement?.remove();
this.#formattedSubtitles = [];
}