kopia lustrzana https://github.com/Aircoookie/WLED
32 wiersze
1.2 KiB
HTML
32 wiersze
1.2 KiB
HTML
<!DOCTYPE html>
|
|
<html lang="en">
|
|
<head>
|
|
<meta content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no" name="viewport">
|
|
<meta charset="utf-8">
|
|
<title>PIN required</title>
|
|
<script>
|
|
var d = document;
|
|
function B() { window.open("../settings","_self"); }
|
|
</script>
|
|
<style>
|
|
@import url("style.css");
|
|
</style>
|
|
<script>
|
|
function checkNum(o) {
|
|
const specialkeys = ["Backspace", "Tab", "Enter", "Shift", "Control", "Alt", "Pause", "CapsLock", "Escape", "Space", "PageUp", "PageDown", "End", "Home", "ArrowLeft", "ArrowUp", "ArrowRight", "ArrowDown", "Insert", "Delete"];
|
|
// true if key is a number or a special key
|
|
if(event.key.match(/[0-9]/) || specialkeys.includes(event.key)) return true;
|
|
event.preventDefault();
|
|
return false;
|
|
}
|
|
</script>
|
|
</head>
|
|
<body onload="d.getElementsByName('PIN')[0].focus()">
|
|
<form id="form_s" name="Sf" method="post">
|
|
<h2>Please enter settings PIN code</h2>
|
|
<input type="password" name="PIN" size="4" maxlength="4" minlength="4" onkeydown="checkNum(this)" pattern="[0-9]*" inputmode="numeric" autofocus>
|
|
<hr>
|
|
<button type="button" onclick="B()">Back</button><button type="submit">Submit</button>
|
|
</form>
|
|
</body>
|
|
</html> |