feat: Support dark mode for zoom-image plugin (#2524)

This commit is contained in:
Luffy 2025-01-05 15:23:17 +08:00 committed by GitHub
parent c18df4c46b
commit 58268632c8
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -10,13 +10,17 @@ function install(hook) {
),
);
Docsify.dom.style(
`.medium-zoom-image--opened,.medium-zoom-overlay{z-index:999}`,
);
elms = elms.filter(elm => !elm.matches('a img'));
if (zoom) {
zoom.detach();
}
zoom = mediumZoom(elms);
zoom = mediumZoom(elms, { background: 'var(--color-bg)' });
});
}