mirror of
https://gitcode.com/gh_mirrors/hy/Hydro.git
synced 2026-10-17 09:36:08 +08:00
15 lines
426 B
JavaScript
15 lines
426 B
JavaScript
import { AutoloadPage } from 'vj/misc/PageLoader';
|
|
|
|
const highlighterPage = new AutoloadPage('highlighterPage', () => {
|
|
import('./prismjs').then((module) => {
|
|
const prismjs = module.default;
|
|
function runHighlight($container) {
|
|
prismjs.highlightBlocks($container);
|
|
}
|
|
runHighlight($('body'));
|
|
$(document).on('vjContentNew', e => runHighlight($(e.target)));
|
|
});
|
|
});
|
|
|
|
export default highlighterPage;
|