mirror of
https://github.com/ajayyy/SponsorBlock.git
synced 2025-12-08 20:47:11 +03:00
Don't allow changing userID if warned
This commit is contained in:
@@ -492,6 +492,22 @@ 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");
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
element.querySelector(".option-hidden-section").classList.remove("hidden");
|
element.querySelector(".option-hidden-section").classList.remove("hidden");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user