1
0
mirror of https://github.com/cotes2020/jekyll-theme-chirpy.git synced 2025-12-20 14:42:46 +00:00

refactor: improve toc popup module

This commit is contained in:
Cotes Chung
2024-10-19 21:13:21 +08:00
parent 03e302cbf6
commit 6f461132c0
4 changed files with 49 additions and 34 deletions

View File

@@ -5,7 +5,10 @@ const desktopMode = matchMedia('(min-width: 1200px)');
function refresh(e) {
if (e.matches) {
mobile.hidePopup();
if (mobile.popupOpened) {
mobile.hidePopup();
}
desktop.refresh();
} else {
mobile.refresh();