FASTEST 2025 Google Translate

Super-fast Google Translate with instant SPA/AJAX support, no hiding

作者
insta/@WaterDustLab
今日安裝
0
安裝總數
1
評價
0 0 0
版本
1.2
建立日期
2025-11-03
更新日期
2025-11-03
尺寸
2.9 KB
授權條款
未知
腳本執行於
所有網站

Translate all sites into English upon detection of different languages

🔥Key focuses:
Speed up: Async script loading, lazy init, minimal overhead.
Dynamic content: Use MutationObserver to detect and re-translate new elements instantly (e.g., for single-page apps like React/Vue where content loads via AJAX).
No toolbar hiding—let it show naturally if Google Translate decides to.
2️⃣ Core Optimizations
Faster init: Load script async, init only when ready, use pageLanguage 'auto' for quick detection.
Dynamic translation: MutationObserver watches for DOM changes and triggers re-translation on new content.
SPA/AJAX handling: Observer subtree/childList to catch async-loaded elements; call Google's translate methods on mutations.
Minimal footprint: No extra CSS, no observers for hiding—just for translation triggers.
Still Google Translate: Keeps the fast engine.
Note: Google Translate's API doesn't have a direct "re-translate" method for subsets, so i have simulated by re-initializing or using their internal refresh if available, but optimized to avoid full page reloads.

QingJ © 2025

镜像随时可能失效,请加Q群300939539或关注我们的公众号极客氢云获取最新地址