refactor(tapops): modularize page code

This commit is contained in:
Dodo
2026-06-04 18:13:23 +07:00
parent 529693cd5f
commit 1270ce60fd
41 changed files with 4678 additions and 4476 deletions
+1 -25
View File
@@ -16,26 +16,6 @@
<link rel="stylesheet" href="css/variables.css">
<link rel="stylesheet" href="css/viewer.css">
<!--
Early asset prefetch: start downloading the file immediately while the
rest of the page (CSS, fonts, scripts) loads in parallel. This shaves
off the entire page-load time from the perceived wait.
-->
<script>
(function() {
var params = new URLSearchParams(window.location.search);
var id = params.get('id');
if (id) {
var link = document.createElement('link');
link.rel = 'prefetch';
link.as = 'fetch';
link.crossOrigin = 'anonymous';
link.href = 'https://api.ifuntanhub.dev/assets/' + id;
document.head.appendChild(link);
}
})();
</script>
</head>
<body class="viewer-body">
@@ -63,11 +43,7 @@
</div>
</main>
<!--
DOCX libraries are now lazy-loaded by viewer.js ONLY when type=docx.
PDFs no longer wait for ~350KB of unused scripts to download.
-->
<script src="js/viewer.js"></script>
<script type="module" src="js/viewer/viewer-app.js"></script>
</body>
</html>