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 TITLE = APP_NAME
DEBUG = False DEBUG = False
TESTING = False TESTING = False
THREADED =True THREADED = True
SECRET_KEY = secrets.token_hex(32) SECRET_KEY = secrets.token_hex(32)
PERMANENT_SESSION_LIFETIME = timedelta(days = 7).total_seconds() PERMANENT_SESSION_LIFETIME = timedelta(days = 7).total_seconds()

View File

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

View File

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