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

13 lines
407 B
Plaintext
Raw Permalink Normal View History

2024-02-12 23:07:56 +08:00
<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>