MCPcopy Index your code
hub / github.com/Bistutu/FluentRead / toggleSelectionTranslator

Function toggleSelectionTranslator

entrypoints/utils/selectionTranslator.ts:55–66  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

53 * 切换选词翻译组件的启用状态
54 */
55export function toggleSelectionTranslator() {
56 if (selectionTranslatorInstance) {
57 unmountSelectionTranslator();
58 config.disableSelectionTranslator = true;
59 } else {
60 config.disableSelectionTranslator = false;
61 mountSelectionTranslator();
62 }
63
64 // 保存配置到存储
65 saveConfig();
66}
67
68/**
69 * 保存配置到存储

Callers

nothing calls this directly

Calls 3

mountSelectionTranslatorFunction · 0.85
saveConfigFunction · 0.70

Tested by

no test coverage detected