-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.html
More file actions
134 lines (122 loc) · 4.25 KB
/
index.html
File metadata and controls
134 lines (122 loc) · 4.25 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
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Open logiqRMA Link</title>
<style>
body {
font-family: 'Courier New', Courier, monospace; /* Monospace font */
display: flex;
justify-content: center;
align-items: center;
height: 100vh;
margin: 0;
background-color: #041752;
}
#container {
text-align: center;
}
#display {
font-size: 2rem;
text-align: center;
width: 320px;
height: 80px;
border: 2px solid #000;
display: flex;
align-items: center;
justify-content: center;
letter-spacing: 0.5rem;
border-radius: 7px;
margin: 0 auto;
background-color: #fff;
font-family: 'Courier New', Courier, monospace; /* Monospace font */
font-size: 3rem;
font-weight: bold;
}
#numberInput {
position: absolute;
opacity: 0;
height: 0;
width: 0;
}
button {
font-family: 'Courier New', Courier, monospace; /* Monospace font */
font-weight: bold;
width: 325px;
height: 80px;
background-color: #7abf24;
border-radius: 7px;
display: block;
font-size: 3rem;
margin: 10px auto;
cursor: pointer;
}
</style>
</head>
<body>
<div id="container">
<div id="display">1*******</div>
<input type="text" id="numberInput" maxlength="8" inputmode="numeric" pattern="[0-9]*" />
<button id="clearButton">Clear</button>
</div>
<script>
window.onload = function() {
const input = document.getElementById('numberInput');
const display = document.getElementById('display');
const clearButton = document.getElementById('clearButton');
let redirected = false;
function updateDisplay() {
const enteredDigits = input.value.slice(1); // Get digits after "1"
const stars = '*'.repeat(7 - enteredDigits.length); // 8 total chars, 1 digit + 7 stars
display.textContent = `1${enteredDigits}${stars}`;
}
// Initialize with "1"
input.value = "1";
updateDisplay();
display.addEventListener('click', () => {
input.focus();
});
window.addEventListener('focus', () => {
input.value = "1";
redirected = false;
input.focus();
updateDisplay();
});
clearButton.addEventListener('click', () => {
input.value = "1";
redirected = false;
input.focus();
updateDisplay();
});
input.addEventListener('keydown', (event) => {
if (event.key === "Backspace" && input.value.length <= 1) {
event.preventDefault();
}
});
input.addEventListener('input', () => {
if (!input.value.startsWith("1")) {
input.value = "1" + input.value.replace(/[^0-9]/g, '');
} else {
input.value = input.value.replace(/[^0-9]/g, '');
}
if (input.value.length > 8) {
input.value = input.value.slice(0, 8);
}
updateDisplay();
if (input.value.length === 8 && !redirected) {
const url = `https://logiqrma.com/ombytte/Main?tpl=req&prm=dspreq&rid=${input.value}`;
const newWindow = window.open(url, '_blank');
if (newWindow) {
newWindow.focus();
redirected = true;
} else {
alert('Please allow pop-ups for this website to proceed.');
}
}
});
input.focus();
};
</script>
</body>
</html>