Reference index.html from tobiichi3227

This commit is contained in:
ChenKaiLiuG
2025-04-14 11:31:47 +08:00
committed by GitHub
parent 1cb2b7e57c
commit 0e2baa5c96

View File

@@ -1,43 +1,24 @@
<!DOCTYPE html>
<html>
<head>
<title>逐字顯示</title>
<style>
#output {
font-size: 2em;
}
</style>
</head>
<body>
<div id="output"></div>
<script>
async function loadAndDisplay() {
try {
const response = await fetch('/get_file_content');
if (!response.ok) {
throw new Error(`HTTP error! status: ${response.status}`);
}
const text = await response.text();
let index = 0;
const outputDiv = document.getElementById('output');
function displayNextChar() {
if (index < text.length) {
outputDiv.textContent += text[index];
index++;
setTimeout(displayNextChar, 1000); // 每秒顯示一個字
}
}
displayNextChar();
} catch (error) {
console.error('無法載入檔案內容:', error);
document.getElementById('output').textContent = '無法載入檔案內容。';
<head>
<title>找找自己問題</title>
<style>
::cue {
background: none;
}
}
</style>
</head>
window.onload = loadAndDisplay;
</script>
</body>
<body>
<!--
<h3>That's why you DON'T Copy-Paste Random Code from the Internet</h3>
<h3>Tsoding (@tsoding) <a href="https://twitter.com/tsoding/status/1765823410284720600">March 7, 2024</a></h3>
<h3><a href="https://www.adaic.org/resources/add_content/standards/05rat/html/Rat-8-4.html">『Fucking Website』</a></h3>
<h3><a href="https://www.adaic.org/resources/add_content/standards/05rat/html/Rat-8-4.html#:~:text=Part_Type)%C2%A0return%C2%A0Hash_Type%C2%A0is-,M31%3A%C2%A0constant%C2%A0%3A%3D%C2%A02**31%E2%80%931%3B%C2%A0%C2%A0%C2%A0%C2%A0%2D%2D%C2%A0a%C2%A0nice%C2%A0Mersenne%C2%A0prime,-begin%0A%C2%A0%C2%A0%C2%A0return%C2%A0Hash_Type(P">Line of Code</a></h3>
<h3><a href="https://github.com/tsoding/eepers/blob/4411c4fc37dc890095f5afc2e835889270100084/eepers.adb#L219">The line of source code</a></h3>
<video width="1280" height="720" controls>
<source src="./this-is-not-minus.mp4" type="video/mp4">
<track src="./this-is-not-minus.vtt" kind="subtitles" srclang="en-us" label="English" default>
</video>
-->
</body>
</html>