mirror of
https://github.com/jackyzha0/quartz.git
synced 2025-12-24 21:34:06 -06:00
feat(clipboard): refactored for new DOM listener in MPA
This commit is contained in:
parent
9fa93bccc1
commit
b18efb6d06
@ -130,19 +130,11 @@
|
|||||||
const init = (doc = document) => {
|
const init = (doc = document) => {
|
||||||
// NOTE: everything within this callback will be executed for initial page navigation. This is a good place to put JavaScript that only replaces DOM nodes.
|
// NOTE: everything within this callback will be executed for initial page navigation. This is a good place to put JavaScript that only replaces DOM nodes.
|
||||||
{{if $.Site.Data.config.enableCodeBlockCopy -}}
|
{{if $.Site.Data.config.enableCodeBlockCopy -}}
|
||||||
{{if $.Site.Data.config.enableSPA -}}
|
|
||||||
addCopyButtons();
|
addCopyButtons();
|
||||||
{{ else }}
|
|
||||||
window.addEventListener("DOMContentLoaded", addCopyButtons);
|
|
||||||
{{ end }}
|
|
||||||
{{ end }}
|
{{ end }}
|
||||||
|
|
||||||
{{if $.Site.Data.config.enableCodeBlockTitle -}}
|
{{if $.Site.Data.config.enableCodeBlockTitle -}}
|
||||||
{{if $.Site.Data.config.enableSPA -}}
|
|
||||||
addTitleToCodeBlocks();
|
addTitleToCodeBlocks();
|
||||||
{{ else }}
|
|
||||||
window.addEventListener("DOMContentLoaded", addTitleToCodeBlocks);
|
|
||||||
{{- end -}}
|
|
||||||
{{- end -}}
|
{{- end -}}
|
||||||
{{if $.Site.Data.config.enableLatex}}
|
{{if $.Site.Data.config.enableLatex}}
|
||||||
renderMathInElement(doc.body, {
|
renderMathInElement(doc.body, {
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user