]> git.immae.eu Git - perso/Immae/Projets/Nodejs/Surfer.git/blobdiff - frontend/js/app.js
Carry over public.html fixes to index.html
[perso/Immae/Projets/Nodejs/Surfer.git] / frontend / js / app.js
index 9ce073e39383afa76c0a2ad189bfeabdce131e33..f532bc1e508515a9196329474af9e53450644ce9 100644 (file)
@@ -150,7 +150,15 @@ function open(row, column, event) {
     app.activeEntry.fullPath = encode(sanitize(app.path + '/' + row.filePath));
     app.previewDrawerVisible = true
 
-    // window.open(encode(path));
+    // need to wait for DOM element to exist
+    setTimeout(function () {
+        $('iframe').on('load', function (e) {
+            if (!e.target.contentWindow.document.body) return;
+
+            e.target.contentWindow.document.body.style.display = 'flex'
+            e.target.contentWindow.document.body.style.justifyContent = 'center'
+        });
+    }, 0);
 }
 
 function uploadFiles(files) {