Skip to content

Commit

Permalink
Improvements on the WebUI (continued)
Browse files Browse the repository at this point in the history
  • Loading branch information
wberube committed Aug 9, 2024
1 parent 2c6531e commit 165eff4
Showing 1 changed file with 0 additions and 24 deletions.
24 changes: 0 additions & 24 deletions res/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -42,24 +42,6 @@
req.send();
}

function logged() {
var req = new XMLHttpRequest();
req.onreadystatechange = function() {
if (this.readyState != 4 || this.status != 200) return;
return req.getAllResponseHeaders().indexOf('WWW-Authenticate') !== -1;
}
req.open('GET', '/');
req.send();
return false;
}

function logout() {
if (isIe)
document.execCommand('ClearAuthenticationCache', 'false');
else
window.location = window.location.href.replace('://', '://log:out@');
}

function setSource(id, src) {
var frame = document.getElementById(id), ext = ".mp4";
if (frame.firstChild) frame.firstChild.src = "#";
Expand All @@ -76,9 +58,6 @@
}

function onLoad() {
if (!logged())
document.getElementById('logout').classList += " hid";

apiRead('audio');
apiRead('jpeg');
apiRead('night');
Expand Down Expand Up @@ -268,9 +247,6 @@ <h2 class="unl">Media</h2>
<a href="#media" class="ph2 white">Media</a>
<a href="image.jpg" class="ph2 white" target="_blank">Snapshot</a>
</div>
<div class="1 col">
<a id="logout" href="javascript:logout()" class="btn ph2 black">Logout</a>
</div>
</div>
<div class="c cont">
<h2 class="unl">Status</h2>
Expand Down

0 comments on commit 165eff4

Please sign in to comment.