Fix the bug

This commit is contained in:
Zach Fox 2017-04-14 15:42:19 -07:00
parent 6a6800b8c3
commit f81dce5e70

View file

@ -11,6 +11,7 @@
//
var paths = [], idCounter = 0, imageCount;
var loadingGifPath = '../../../resources/icons/loadingDark.gif';
function addImage(data) {
if (!data.localPath) {
return;
@ -84,12 +85,14 @@ window.onload = function () {
if (messageOptions.containsGif) {
if (messageOptions.processingGif) {
imageCount = message.action.length + 1; // "+1" for the GIF that'll finish processing soon
message.action.unshift({ localPath: '../../../resources/icons/loadingDark.gif' });
message.action.unshift({ localPath: loadingGifPath });
message.action.forEach(addImage);
document.getElementById('p0').disabled = true;
} else {
var gifPath = message.action[0].localPath;
document.getElementById('p0').disabled = false;
document.getElementById('p0img').src = message.action[0].localPath;
document.getElementById('p0img').src = gifPath;
paths[0].localPath = gifPath;
}
} else {
imageCount = message.action.length;