Small js changes

This commit is contained in:
maximstewart 2021-02-13 05:33:17 -06:00
parent 73192d136f
commit d3a30067fa
3 changed files with 15 additions and 17 deletions

View File

@ -18,7 +18,7 @@ class Config(object):
TITLE = APP_NAME
DEBUG = False
TESTING = False
THREADED =True
THREADED = True
SECRET_KEY = secrets.token_hex(32)
PERMANENT_SESSION_LIFETIME = timedelta(days = 7).total_seconds()

View File

@ -3,21 +3,22 @@ window.onload = (eve) => {
}
document.body.onload = (eve) => {
getFavesAjax();
reloadDirectory();
if (window.self !== window.top) {
setTimeout(function () {
let elm = document.getElementById("bg");
elm.parentElement.removeChild(elm);
let elm = document.getElementById("bg");
elm.parentElement.removeChild(elm);
// Stylesheet for iframe views
let link = document.createElement("link");
link.href = formatURL("static/css/iframe.css");
link.type = "text/css";
link.rel = "stylesheet";
document.getElementsByTagName("head")[0].appendChild(link);
}, 500);
// Stylesheet for iframe views
let link = document.createElement("link");
link.href = "static/css/iframe.css";
link.type = "text/css";
link.rel = "stylesheet";
document.getElementsByTagName("head")[0].appendChild(link);
}
setTimeout(function () {
getFavesAjax();
reloadDirectory();
}, 200);
}

View File

@ -5,9 +5,7 @@
<div class="modal-content">
<div class="modal-header">
<h3>File Viewer:</h3>
<button type="button" onclick="pauseVideo()" class="close" data-dismiss="modal" aria-label="Close">
<span aria-hidden="true">&times;</span>
</button>
<button onclick="pauseVideo()" type="button" data-dismiss="modal" class="btn btn-danger btn-sm">Close</button>
</div>
<div class="modal-body text-center justify-content-center">
@ -69,7 +67,6 @@
</div>
<div class="modal-footer">
<button onclick="pauseVideo()" type="button" data-dismiss="modal" class="btn btn-danger btn-sm">Close</button>
</div>
</div>
</div>