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:
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user