()
| 482 | |
| 483 | // 定义全局的 cleanup 函数 |
| 484 | function cleanup() { |
| 485 | // 恢复滚动位置 |
| 486 | window.scrollTo(originalScrollLeft, originalScrollTop); |
| 487 | |
| 488 | // 恢复UI显示 - 传递存储的原始状态 |
| 489 | showFeHelperUI(window._fh_original_displays || {}); |
| 490 | showFixedElements(); |
| 491 | |
| 492 | // 隐藏进度UI |
| 493 | const progressContainer = document.getElementById('fehelper-screenshot-progress'); |
| 494 | if (progressContainer) { |
| 495 | progressContainer.style.display = 'none'; |
| 496 | } |
| 497 | |
| 498 | // 重新显示工具条 |
| 499 | const screenshotContainer = document.getElementById('fehelper_screenshot_container'); |
| 500 | if (screenshotContainer) { |
| 501 | screenshotContainer.style.display = 'block'; |
| 502 | } |
| 503 | |
| 504 | window._fh_screenshot_in_progress = false; |
| 505 | window._fh_screenshot_cancel_callback = null; |
| 506 | window._fh_fixed_elements = null; // Clear fixed elements cache |
| 507 | window._fh_original_displays = null; // Clear UI display cache |
| 508 | } |
| 509 | |
| 510 | // 配置项 |
| 511 | const captureConfig = { |
no test coverage detected