MCPcopy
hub / github.com/Bistutu/FluentRead / handleRetryClick

Function handleRetryClick

entrypoints/utils/icon.ts:58–73  ·  view source on GitHub ↗
(node: HTMLElement, wrapper: HTMLElement)

Source from the content-addressed store, hash-verified

56
57// 处理重试按钮点击事件
58function handleRetryClick(node: HTMLElement, wrapper: HTMLElement) {
59 return (event: MouseEvent) => {
60 event.preventDefault();
61 event.stopPropagation();
62
63 wrapper.remove(); // 移除错误提示元素,重新翻译
64 node.classList.remove("fluent-read-failure"); // 移除失败标记
65
66 // 根据当前配置的翻译模式决定使用哪种翻译方式
67 if (config.display === styles.bilingualTranslation) {
68 handleBilingualTranslation(node, false);
69 } else {
70 handleSingleTranslation(node, false);
71 }
72 };
73}
74
75// 处理错误提示按钮点击事件
76function handleErrorClick(errMsg: string) {

Callers 1

insertFailedTipFunction · 0.85

Calls 2

handleSingleTranslationFunction · 0.90

Tested by

no test coverage detected