MCPcopy
hub / github.com/iChochy/NCE / loadTranslationPreference

Method loadTranslationPreference

js/ReadingSystem.js:818–823  ·  view source on GitHub ↗

* 加载翻译显示偏好

()

Source from the content-addressed store, hash-verified

816 * 加载翻译显示偏好
817 */
818 loadTranslationPreference() {
819 const storedMode = getStorage(this.config.STORAGE_KEYS.TRANSLATION_MODE);
820 if (this.config.TRANSLATION_MODES.includes(storedMode)) {
821 this.state.translationMode = storedMode;
822 }
823 }
824
825 /**
826 * 更新翻译切换 UI

Callers 1

initMethod · 0.95

Calls 1

getStorageFunction · 0.90

Tested by

no test coverage detected