Browse Source

Fix progress bar

Julien Vaubourg 9 years ago
parent
commit
002bfd2011

BIN
olinux/script/initramfs/www/img/caticorn_success.png


+ 4 - 0
olinux/script/initramfs/www/index.html

@@ -207,6 +207,7 @@
 
     function failed() {
       document.getElementById('doesnwork').play();
+      document.getElementById('progress').style.width = "0%";
       document.getElementById('error').style.display = 'block';
       document.getElementById('mainimg').src = document.getElementById('mainimg').src.replace('caticorn', 'caticorn_failed');
     }
@@ -237,6 +238,9 @@
     function onLoadHandler() {
       focusText();
 
+      var preloadSuccessImg = new Image();
+      preloadSuccessImg.src = '/img/caticorn_success.png';
+
       var nojs = document.getElementsByClassName('no-js');
 
       for(var i = 0; i < nojs.length; i++) {