hexo-theme-stellar/layout/_plugins/copycode.ejs

13 lines
407 B
Plaintext

<script>
document.addEventListener('DOMContentLoaded', function () {
window.codeElements = document.querySelectorAll('.code');
if (window.codeElements.length > 0) {
ctx.copycode = {
default_text: `<%- conf.default_text %>`,
success_text: `<%- conf.success_text %>`,
toast: `<%- conf.toast %>`,
};
utils.js('/js/plugins/copycode.js');
}
});
</script>