forked from SnowLord7/quizlet
-
Notifications
You must be signed in to change notification settings - Fork 0
/
ban.js
28 lines (26 loc) · 915 Bytes
/
ban.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
try {
var request = new XMLHttpRequest();
request.open('GET', "https://raw.githubusercontent.com/SnowLord7/info/master/banlist.txt", true);
request.onload = function() {
if (request.status >= 200 && request.status < 400) {
var data = JSON.parse(request.responseText);
var banned = false;
data.bans.forEach(function(ban) {
if (ban.user == Quizlet.user.username) {
banned = true;
document.write(`<title>Quizlet | You were banned!</title><body style=background-image:url(https://i.imgur.com/mSGXLXY.jpg);cursor:none;overflow:hidden><div style=position:absolute;bottom:10px;width:100%;text-align:center;font-size:30px;color:#fff>${ban.reason}</div>`);
}
});
if (!banned) {
loadModule();
}
}
};
request.onerror = function() {
console.log("Bad Internet or site blocked 0:");
loadModule();
};
request.send();
} catch(e) {
loadModule();
}