-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdark-horse-blockpage.html
108 lines (94 loc) · 2.7 KB
/
dark-horse-blockpage.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
104
105
106
107
108
<html>
<head>
<!-- Google fonts -->
<link rel="preconnect" href="https://fonts.googleapis.com">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<link href="https://fonts.googleapis.com/css2?family=Inconsolata&family=Roboto+Mono&display=swap" rel="stylesheet">
</head>
<style>
body, html {
background-color: #141414;
color: white;
font-family: 'Roboto Mono', monospace;
font-size: 1.5rem;
text-align: center;
}
form {
margin-top: 4rem;
}
.submit {
padding: 0.75rem;
margin-top: 2rem;
border: none;
font-size: 1rem;
font-weight: bold;
border-radius: 1.25rem 1.25rem 1.25rem 1.25rem;
}
.submit:hover {
cursor: pointer;
text-shadow:
-0.2px -0.2px 0 black,
0.2px -0.2px 0 black,
-0.2px 0.2px 0 black,
0.2px 0.2px 0 black;
-webkit-transition: all 0.5s;
-moz-transition: all 0.5s;
-o-transition: all 0.5s;
transition: all 0.5s;
}
.keybox {
padding: 0.5rem;
vertical-align: middle;
text-align: center;
font-size: 1rem;
font-family: 'Inconsolata', monospace;
}
#message {
font-size: 1rem;
margin-top: 1rem;
}
</style>
<body>
<form action="javascript:void(0);" onsubmit="return darkhorseblockpage()">
License key: <input class="keybox" type="text" id="fkey" size="33" name="fkey">
<br>
<input class="submit" type="submit" value="Submit">
</form>
<br>
<a id="message">Insert your Dark Horse license key</a>
<script>
function darkhorseblockpage() {
var message = document.getElementById("message");
var fkey = document.getElementById("fkey").value;
submitOK = "true";
console.log("fkey: "+fkey);
var url = "https://api.gumroad.com/v2/licenses/verify";
var xhr = new XMLHttpRequest();
xhr.open("POST", url);
xhr.setRequestHeader("Content-Type", "application/x-www-form-urlencoded");
xhr.onreadystatechange = function () {
if (xhr.readyState === 4) {
response = xhr.responseText;
jsresponse = JSON.parse(response);
console.log(jsresponse.success);
console.log(jsresponse.uses);
if (jsresponse.success == true && jsresponse.uses < 4) {
message.innerHTML = "Success! Redirecting...";
message.style.color = "green";
window.open("https://www.codesignatures.dev/home/dark-horse-blockpage/secreturl-b408iwkn1rtiv2p7r7se");
window.close();
} else if (jsresponse.success == true) {
message.innerHTML = "Max use limit reached (3)";
message.style.color = "yellow";
} else {
message.innerHTML = jsresponse.message;
message.style.color = "red";
}
}};
var apilink = "product_permalink=dark-horse&license_key=" + fkey;
xhr.send(apilink);
return false;
}
</script>
</body>
</html>