-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
103 lines (96 loc) · 3.33 KB
/
index.html
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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Are We Protected B?</title>
<style>
body, html {
margin: 0;
padding: 0;
font-family: Arial, sans-serif;
height: 100%;
box-sizing: border-box;
}
.content {
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
text-align: center;
font-size: 2em;
}
.domain {
font-weight: bold;
font-size: 1.1em; /* Adjust the size if necessary */
}
.green-background {
background-color: green;
}
.soon {
background-color: #FFA500; /* Orange background */
}
.answer {
color: white;
text-shadow: 0px 0px 8px rgba(0, 0, 0, 0.5);
}
footer {
text-align: center;
font-size: 1em;
position: fixed;
bottom: 0;
width: 100%;
padding: 10px 0;
background-color: #333; /* Dark background for footer */
color: white; /* White text for footer */
}
footer a {
color: #9DCEFF; /* Light blue color for links */
text-decoration: none;
}
footer a:hover {
text-decoration: underline;
}
</style>
</head>
<body>
<div class="content" id="content">
Are we prob? Navigate with parameters to find out!
</div>
<footer>
Check out the project on GitHub:
<a href="https://github.com/KingBain/AreWeProB" target="_blank">KingBain/AreWeProB</a>
</footer>
<script>
function getQueryVariable(variable) {
const query = window.location.search.substring(1);
const params = new URLSearchParams(query);
return params.get(variable);
}
function checkParameters() {
const domain = getQueryVariable("domain");
const prob = getQueryVariable("prob");
const contentElement = document.getElementById("content");
if (domain && prob) {
contentElement.textContent = ""; // Clear previous content
const questionElement = document.createElement("span");
questionElement.innerHTML = `Is <span class='domain'>${domain}</span> Protected B ?`; // Assuming this is safe
const answerElement = document.createElement("span");
answerElement.className = 'answer';
answerElement.textContent = prob === "true" ? "Yes" : "Soon...";
if (prob === "true") {
document.body.classList.add("green-background");
} else if (prob === "false") {
document.body.classList.add("soon");
}
contentElement.appendChild(questionElement);
contentElement.appendChild(document.createElement("br"));
contentElement.appendChild(answerElement);
} else {
contentElement.textContent = "Are we ProB ? Navigate with parameters to find out!";
}
}
checkParameters();
</script>
</body>
</html>