MCPcopy
hub / github.com/zxlie/FeHelper / hideFeHelperUI

Function hideFeHelperUI

apps/screenshot/content-script.js:380–397  ·  view source on GitHub ↗

* 隐藏所有FeHelper UI元素 * 隐藏所有带有 fehelper-ui-element 类或 data-fh-ui 属性的元素 * @returns {Object} 隐藏元素的原始显示状态

()

Source from the content-addressed store, hash-verified

378 * @returns {Object} 隐藏元素的原始显示状态
379 */
380 function hideFeHelperUI() {
381 const uiElements = document.querySelectorAll('.fehelper-ui-element, [data-fh-ui="true"]');
382 const originalDisplays = {};
383
384 uiElements.forEach((element, index) => {
385 // Ensure unique ID for lookup later
386 if (!element.id) {
387 // Assign a temporary, identifiable ID
388 element.id = `fh-temp-id-${Math.random().toString(36).substring(2, 9)}`;
389 }
390 const id = element.id;
391 originalDisplays[id] = element.style.display;
392 element.style.display = 'none';
393 });
394
395 window._fh_original_displays = originalDisplays; // Store globally
396 return originalDisplays; // Keep return for compatibility if needed elsewhere
397 }
398
399 /**
400 * 显示所有FeHelper UI元素

Callers 2

captureVisibleFunction · 0.85
captureFullPageFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected