Commit abc7a899 authored by Jorge Aguilera's avatar Jorge Aguilera 📚

check if copy-to-clipboard is in the page

parent 75d5da1f
Pipeline #42684758 passed with stages
in 3 minutes and 47 seconds
......@@ -45,5 +45,7 @@
return [].slice.call((from || document).querySelectorAll(selector))
}
addBlockClipboard()
if (window.ClipboardJS) {
addBlockClipboard()
}
})()
{{#if (eq page.attributes.copy-to-clipboard '')}}
<script src="{{uiRootPath}}/js/vendor/clipboard.js"></script>
{{/if}}
<script src="{{uiRootPath}}/js/site.js"></script>
<script src="{{uiRootPath}}/js/vendor/highlight.js"></script>
<script>hljs.initHighlighting()</script>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment