-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcheater.js
32 lines (30 loc) · 980 Bytes
/
cheater.js
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
var cheatingGPT
if (cheatingGPT == true) {
cheatingGPT = false
document.querySelectorAll(".cGPT").forEach((e) => {
e.remove();
});
}else{
var DATA_URL = "https://shivamsuyal.github.io/cheaterGPT/";
var link = document.createElement("link");
link.href = `${DATA_URL}style.css`;
link.type = "text/css";
link.rel = "stylesheet";
link.classList.add("cGPT");
document.head.appendChild(link);
fetch(`${DATA_URL}index.html`)
.then((response) => response.text())
.then((data) => {
const parser = new DOMParser();
const htmlDoc = parser.parseFromString(data, "text/html");
const cheaterHTML = htmlDoc.querySelector("body").innerHTML;
document.body.insertAdjacentHTML("beforeend", cheaterHTML);
})
.catch((error) => console.error(error));
setTimeout(() => {
var JS = document.createElement("script");
JS.src = `${DATA_URL}index.js`;
JS.classList.add("cGPT");
document.body.appendChild(JS);
}, 1000);
}