From 32404be96578d7f3717fdaaec9ae6fc053322620 Mon Sep 17 00:00:00 2001 From: Stevan Freeborn <65925598+StevanFreeborn@users.noreply.github.com> Date: Sun, 14 Apr 2024 13:16:23 -0500 Subject: [PATCH] fix: remove redundancy in onload and onupdate --- src/Blog/Components/Pages/Post.razor.js | 8 -------- 1 file changed, 8 deletions(-) diff --git a/src/Blog/Components/Pages/Post.razor.js b/src/Blog/Components/Pages/Post.razor.js index 9b2490f..456d2ff 100644 --- a/src/Blog/Components/Pages/Post.razor.js +++ b/src/Blog/Components/Pages/Post.razor.js @@ -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';