Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
mamayaya1
GitHub Repository: mamayaya1/game
Path: blob/main/js/lib.js
4626 views
1
var msg = "<h1>Hello gamers! Please go <a href='https://3kh0.github.io/'>here</a> for better games.</h1><h3>Site-owners, if you are confused on why this happened, please read <a href='https://github.com/3kh0/3kh0.github.io/wiki/Note-to-people-stealing-my-games'>this</a>.</h3><h5>If you are going to report this, please say it was Error 800.</h5><p>Was this site supposed to work? <a href='https://github.com/3kh0/3kh0.github.io/issues'>Please report it</a>!</p>";
2
3
const good = ["3kh0.github.io", "google.com", "github.com", "cms.instructure.com", "3kh0.vercel.app", "3kh0.netlify.app", "3kh0-git-tms-3kh0.vercel.app"]; // this will be converted into another file when I have the time.
4
5
function check() {
6
console.log("This page is being checked. This should not take long")
7
var domain = document.domain;
8
var adC = good.includes(domain);
9
if (adC = true) {
10
var referrerFull = document.referrer;
11
var referrer = referrerFull.replace('http://',"").replace('https://',"").split(/[/?#]/)[0];
12
var arC = good.includes(referrer);
13
if (arC = false) {
14
document.write(msg);
15
console.error("R error");
16
}
17
} else {
18
document.write(msg);
19
console.error("D error");
20
}
21
console.log("The check is complete! You can use check(); to run it again if you wish.");
22
}
23
24
// These functions can be used for debug purposes
25
function writeMsg() {
26
document.write(msg);
27
console.log("Sucess! :)")
28
}
29
function getReferrer() {
30
var referrerFull = document.referrer;
31
console.log("Referrer: " + referrerFull);
32
var referrer = referrerFull.replace('http://',"").replace('https://',"").split(/[/?#]/)[0];
33
console.log("Referrer host: " + referrer);
34
}
35
function getDomain() {
36
var domain = document.domain;
37
console.log("Domain: " + domain);
38
}
39
40