show access denied only once on wrong accessToken

This commit is contained in:
cracker0dks 2019-06-02 17:40:20 +02:00
parent 9ab207faa0
commit d48f0bf74c

View File

@ -4,6 +4,7 @@ var myUsername = getQueryVariable("username");
var accessToken = getQueryVariable("accesstoken");
myUsername = myUsername || "unknown" + (Math.random() + "").substring(2, 6);
accessToken = accessToken || "";
var accessDenied = false;
var url = document.URL.substr(0, document.URL.lastIndexOf('/'));
var signaling_socket = null;
@ -30,7 +31,10 @@ signaling_socket.on('connect', function () {
});
signaling_socket.on('wrongAccessToken', function () {
alert("Access denied! Wrong accessToken!")
if(!accessDenied) {
accessDenied = true;
showBasicAlert("Access denied! Wrong accessToken!")
}
});
signaling_socket.on('updateSmallestScreenResolution', function (widthHeight) {