-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.html
More file actions
31 lines (28 loc) · 1.2 KB
/
index.html
File metadata and controls
31 lines (28 loc) · 1.2 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Ports Checker</title>
<script src="https://cdn.tailwindcss.com"></script>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.5.1/jquery.min.js"></script>
</head>
<body class="bg-white dark:bg-slate-900 text-center">
<div class="flex h-screen">
<div class="m-auto">
<button type="submit" id="requestPortButton" class="rounded-lg bg-sky-400 py-6 px-8 text-lg font-semibold text-slate-900 hover:bg-sky-200 focus:outline-none focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-sky-300/50 active:bg-sky-500">
CLICK HERE TO CHECK THE PORTS
</button>
</div>
</div>
<script type="text/javascript">
if ("serial" in navigator) {
document.getElementById("requestPortButton").addEventListener('click', async () => {
// Prompt user to select any serial port.
const port = await navigator.serial.requestPort();
});
}
</script>
</body>
</html>