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

Function unmountFloatingBall

entrypoints/utils/floatingBall.ts:201–219  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

199 * 卸载悬浮球
200 */
201export function unmountFloatingBall() {
202 if (floatingBallInstance && app) {
203 // 移除事件监听
204 document.removeEventListener('fluentread-toggle-translation', toggleFloatingBallTranslation);
205
206 // 获取容器
207 const container = document.getElementById('fluent-read-floating-ball-container');
208
209 // 卸载 Vue 应用
210 app.unmount();
211 floatingBallInstance = null;
212 app = null;
213
214 // 移除容器
215 if (container) {
216 container.remove();
217 }
218 }
219}
220
221/**
222 * 切换悬浮球可见性

Callers 3

mainFunction · 0.90
toggleFloatingBallFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected