From 8a4468b2abc81d6d6a6c2d53f0439483f1e199fa Mon Sep 17 00:00:00 2001 From: moris Date: Mon, 3 Mar 2025 22:01:07 +0900 Subject: [PATCH] =?UTF-8?q?=E5=90=84=E3=82=A4=E3=83=99=E3=83=B3=E3=83=88?= =?UTF-8?q?=E3=81=AB=E3=82=B3=E3=83=A1=E3=83=B3=E3=83=88=E3=82=92=E8=BF=BD?= =?UTF-8?q?=E5=8A=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/routes/(DefaultStyle)/post/[slug]/+page.svelte | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/routes/(DefaultStyle)/post/[slug]/+page.svelte b/src/routes/(DefaultStyle)/post/[slug]/+page.svelte index da76c01..aef2673 100644 --- a/src/routes/(DefaultStyle)/post/[slug]/+page.svelte +++ b/src/routes/(DefaultStyle)/post/[slug]/+page.svelte @@ -13,6 +13,7 @@ const baseURL = `https://${PUBLIC_HOSTNAME}${base}` + // toggle code frame onMount(()=>{ let toggleHide = function(e:MessageEvent){ if (e.data.message === 'toggleHide') { @@ -32,6 +33,7 @@ return ()=>{window.removeEventListener('message', toggleHide)} }) + // header marker onMount(()=>{ function setMarkerClass(id:string) { let hash = document.querySelector("#blog .marker"); @@ -58,6 +60,7 @@ return ()=>{window.removeEventListener('hashchange', hashChange)} }) + // copy code onMount(()=>{ document.getElementById('blog')?.addEventListener('click',(e:MouseEvent)=>{ if (e.target instanceof HTMLElement && e.target.matches('pre')) {