forked from izu/student-web-if-development-kit
refactor(tapops): modularize page code
This commit is contained in:
@@ -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>
|
||||
|
||||
Reference in New Issue
Block a user