(panel, btn)
| 603 | } |
| 604 | |
| 605 | function toggleHistoryPanel(panel, btn) { |
| 606 | const isVisible = panel.classList.contains('show'); |
| 607 | |
| 608 | // 先隐藏所有面板 |
| 609 | hideAllHistoryPanels(); |
| 610 | |
| 611 | if (!isVisible) { |
| 612 | panel.classList.add('show'); |
| 613 | btn.textContent = '▲'; |
| 614 | } |
| 615 | } |
| 616 | |
| 617 | function hideAllHistoryPanels() { |
| 618 | [fontHistoryPanel, bgHistoryPanel].forEach(panel => { |
no test coverage detected