minor: "Restricted" server join button if not allowed
This commit is contained in:
parent
afe9eaaf6f
commit
5743cf2422
1 changed files with 10 additions and 0 deletions
|
|
@ -146,6 +146,16 @@ const Gamepasses = Array.from(GamepassesTab.getElementsByClassName('card')) || [
|
||||||
if (Settings.ReaddCopyablePlacesOn === true) {
|
if (Settings.ReaddCopyablePlacesOn === true) {
|
||||||
ReaddCopyable()
|
ReaddCopyable()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (document.querySelector('.text-warning .fa-lock') || new URLSearchParams(window.location.search).has('testRestrictedServers')) {
|
||||||
|
const ServerJoinButtons = Array.from(document.querySelectorAll('#servers-tabpane button'));
|
||||||
|
for (let button of ServerJoinButtons) {
|
||||||
|
button.classList.add('btn-secondary');
|
||||||
|
button.classList.remove('btn-success');
|
||||||
|
button.disabled = true;
|
||||||
|
button.innerText = 'Restricted'
|
||||||
|
}
|
||||||
|
}
|
||||||
});
|
});
|
||||||
})();
|
})();
|
||||||
|
|
||||||
|
|
|
||||||
Reference in a new issue