This commit is contained in:
gabrielkheisa
2023-11-27 16:08:58 +07:00
commit 01edfdc9a0
11 changed files with 1094 additions and 0 deletions

13
public/error.html Normal file
View File

@@ -0,0 +1,13 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Error</title>
</head>
<body>
<h1>Cookie is not set, please return to index</h1>
<br>
<h2>Please wait... don't refresh</h2>
</body>
</html>

19
public/index.html Normal file
View File

@@ -0,0 +1,19 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Ronaldo</title>
</head>
<body>
<h1>Ronaldo</h1>
<form action="/process" method="post">
<video src="/video.mp4"></video>
<br>
<label for="text1">Text: </label>
<input type="text" id="text1" name="text1" required>
<br>
<button type="submit">Submit</button>
</form>
</body>
</html>

27
public/process.ejs Normal file
View File

@@ -0,0 +1,27 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Processing...</title>
</head>
<body>
<h1>Processing...</h1>
<br>
<h2 id="check"><%- value %></h2>
</body>
<script>
async function fetchData() {
try {
const response = await fetch('/check');
const data = await response.text();
const dataContainer = document.getElementById('check');
dataContainer.innerHTML = data;
} catch (error) {
console.error('Error fetching data:', error);
}
}
setInterval(fetchData, 1000);
</script>
</html>