]> git.p6c8.net - jirafeau.git/commitdiff
[BUGFIX] Propely set page title during transfer
authorJerome Jutteau <mojo@couak.net>
Tue, 19 Sep 2017 16:58:57 +0000 (18:58 +0200)
committerJerome Jutteau <mojo@couak.net>
Tue, 19 Sep 2017 17:00:22 +0000 (19:00 +0200)
closes #142

Signed-off-by: Jerome Jutteau <mojo@couak.net>
lib/functions.js.php

index 6ee335dacdcb3099dac6ca0a7f4fdfdd4740cc63..d552cd88ff4fecca250c96c162e80f81e2484a61 100644 (file)
@@ -119,7 +119,7 @@ function show_link (reference, delete_code, crypt_key, date)
     document.getElementById('uploading').style.display = 'none';
     document.getElementById('upload').style.display = 'none';
     document.getElementById('upload_finished').style.display = '';
     document.getElementById('uploading').style.display = 'none';
     document.getElementById('upload').style.display = 'none';
     document.getElementById('upload_finished').style.display = '';
-    document.title = 'Jirafeau - 100%';
+    document.title = "<?php echo empty($cfg['title']) ? 'Jirafeau' : $cfg['title']; ?> - 100%";
 
     // Download page
     var download_link_href = 'f.php?h=' + reference;
 
     // Download page
     var download_link_href = 'f.php?h=' + reference;
@@ -203,7 +203,7 @@ function show_upload_progression (percentage, speed, time_left)
     document.getElementById('uploaded_percentage').innerHTML = percentage;
     document.getElementById('uploaded_speed').innerHTML = speed;
     document.getElementById('uploaded_time').innerHTML = time_left;
     document.getElementById('uploaded_percentage').innerHTML = percentage;
     document.getElementById('uploaded_speed').innerHTML = speed;
     document.getElementById('uploaded_time').innerHTML = time_left;
-    document.title = 'Jirafeau - ' + percentage;
+    document.title = "<?php echo empty($cfg['title']) ? 'Jirafeau' : $cfg['title']; ?> - " + percentage;
 }
 
 function hide_upload_progression ()
 }
 
 function hide_upload_progression ()
@@ -211,7 +211,7 @@ function hide_upload_progression ()
     document.getElementById('uploaded_percentage').style.display = 'none';
     document.getElementById('uploaded_speed').style.display = 'none';
     document.getElementById('uploaded_time').style.display = 'none';
     document.getElementById('uploaded_percentage').style.display = 'none';
     document.getElementById('uploaded_speed').style.display = 'none';
     document.getElementById('uploaded_time').style.display = 'none';
-    document.title = 'Jirafeau';
+    document.title = "<?php echo empty($cfg['title']) ? 'Jirafeau' : $cfg['title']; ?>";
 }
 
 function upload_progress (e)
 }
 
 function upload_progress (e)

patrick-canterino.de