mirror of
https://github.com/ajayyy/SponsorBlock.git
synced 2025-12-10 13:37:04 +03:00
@@ -512,15 +512,17 @@ function activatePrivateTextChange(element: HTMLElement) {
|
||||
// See if anything extra must be done
|
||||
switch (option) {
|
||||
case "userID":
|
||||
utils.asyncRequestToServer("GET", "/api/userInfo", {
|
||||
userID: Config.config[option],
|
||||
values: ["warnings", "banned"]
|
||||
}).then((result) => {
|
||||
const userInfo = JSON.parse(result.responseText);
|
||||
if (userInfo.warnings > 0 || userInfo.banned) {
|
||||
setButton.classList.add("hidden");
|
||||
}
|
||||
});
|
||||
if (Config.config[option]) {
|
||||
utils.asyncRequestToServer("GET", "/api/userInfo", {
|
||||
userID: Config.config[option],
|
||||
values: ["warnings", "banned"]
|
||||
}).then((result) => {
|
||||
const userInfo = JSON.parse(result.responseText);
|
||||
if (userInfo.warnings > 0 || userInfo.banned) {
|
||||
setButton.classList.add("hidden");
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
break;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user