-
Notifications
You must be signed in to change notification settings - Fork 0
/
key.js
22 lines (18 loc) · 956 Bytes
/
key.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
async function healer() {
let key = document.getElementById("key").value;
let enddate = document.getElementById("date").value
let today = new Date().toISOString().slice(0, 10);
if (!key || !enddate) {
alert("Enter All Fields")
} else {
let enddateS = new Date(enddate);
let todayS = new Date();
let differenceInMilliseconds = enddateS - todayS;
let differenceInDays = Math.ceil(differenceInMilliseconds / (1000 * 60 * 60 * 24));
let raw = `{"ActivationCode":"${btoa(key)}","EndDate":"${enddate}","Item_id":"35762285","StartDate":"${today}","purchasecode":"7b153b71-ea9e-4fe1-ab25-b7ba31b66d60","validDays":${differenceInDays}}`
raw = btoa(raw)
document.getElementById("gk").style.display = "block"
document.getElementById("genkey").innerText = raw
document.getElementById("nod").innerText = `${differenceInDays} Days Added`
}
}