fix: remove redundancy in onload and onupdate

This commit is contained in:
Stevan Freeborn
2024-04-14 13:16:23 -05:00
committed by GitHub
parent 0bc94e2a59
commit 32404be965
-8
View File
@@ -1,7 +1,3 @@
export function onLoad() {
init();
}
export function onUpdate() {
init();
}
@@ -38,10 +34,6 @@ function addClipboard() {
const codeBlocks = document.querySelectorAll('pre');
codeBlocks.forEach((block) => {
if (block.querySelector('button.copy-button')) {
return;
}
const button = document.createElement('button');
button.className = 'copy-button';
button.type = 'button';