Compare commits

..

2 commits

Author SHA1 Message Date
bd536f2ea5 feat: add launch configuration for Chrome debugging 2025-08-15 21:44:45 +09:00
8e08327dd9 feat: preload image 2025-08-15 21:44:37 +09:00
2 changed files with 19 additions and 1 deletions

15
.vscode/launch.json vendored Normal file
View file

@ -0,0 +1,15 @@
{
// IntelliSense .
// .
// https://go.microsoft.com/fwlink/?linkid=830387() .
"version": "0.2.0",
"configurations": [
{
"type": "chrome",
"request": "launch",
"name": "localhost에 대해 Chrome 시작",
"url": "http://localhost:5173",
"webRoot": "${workspaceFolder}"
}
]
}

View file

@ -69,7 +69,7 @@ function ComicViewer({
return () => { return () => {
img.removeEventListener("load", listener); img.removeEventListener("load", listener);
// abort loading // abort loading
img.src = 'data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEAAAAALAAAAAABAAEAAAI=;'; img.src = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAQAAAC1HAwCAAAAC0lEQVR42mNkYAAAAAYAAjCB0C8AAAAASUVORK5CYII=";
// TODO: use web worker to abort loading image in the future // TODO: use web worker to abort loading image in the future
}; };
} }
@ -85,6 +85,9 @@ function ComicViewer({
)} )}
alt="main content"/> alt="main content"/>
<div className="absolute right-0 w-1/2 h-full z-10 select-none" onMouseDown={() => pageUp(1)} /> <div className="absolute right-0 w-1/2 h-full z-10 select-none" onMouseDown={() => pageUp(1)} />
{curPage + 1 < totalPage && (
<img src={`/api/doc/${doc.id}/comic/${curPage + 1}`} alt="next page" className="sr-only" />
)}
</div> </div>
); );
} }