mirror of
https://github.com/docsifyjs/docsify.git
synced 2025-12-08 19:55:52 +00:00
16 lines
267 B
JavaScript
16 lines
267 B
JavaScript
import mediumZoom from 'medium-zoom'
|
|
|
|
function install (hook) {
|
|
let zoom
|
|
|
|
hook.doneEach(_ => {
|
|
if (zoom) {
|
|
zoom.detach()
|
|
}
|
|
|
|
zoom = mediumZoom('img:not(.emoji):not([data-no-zoom])')
|
|
})
|
|
}
|
|
|
|
$docsify.plugins = [].concat(install, $docsify.plugins)
|