From f81dce5e70ff4f95493845fb4ce5df455d2a17ef Mon Sep 17 00:00:00 2001 From: Zach Fox Date: Fri, 14 Apr 2017 15:42:19 -0700 Subject: [PATCH 1/3] Fix the bug --- scripts/system/html/js/SnapshotReview.js | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/scripts/system/html/js/SnapshotReview.js b/scripts/system/html/js/SnapshotReview.js index 4e2e0223a0..cd650ea679 100644 --- a/scripts/system/html/js/SnapshotReview.js +++ b/scripts/system/html/js/SnapshotReview.js @@ -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; From 85e5173abe95346bce6b4264376d8231fb7a9ca8 Mon Sep 17 00:00:00 2001 From: Zach Fox Date: Fri, 14 Apr 2017 16:11:37 -0700 Subject: [PATCH 2/3] Fix embedded location --- scripts/system/snapshot.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/system/snapshot.js b/scripts/system/snapshot.js index ee441278aa..0198866f26 100644 --- a/scripts/system/snapshot.js +++ b/scripts/system/snapshot.js @@ -90,12 +90,12 @@ function onMessage(message) { needsLogin = true; submessage.share = false; shareAfterLogin = true; - snapshotToShareAfterLogin = {path: submessage.localPath, href: submessage.href}; + snapshotToShareAfterLogin = {path: submessage.localPath, href: submessage.href || href}; } if (submessage.share) { print('sharing', submessage.localPath); outstanding = true; - Window.shareSnapshot(submessage.localPath, submessage.href); + Window.shareSnapshot(submessage.localPath, submessage.href || href); } else { print('not sharing', submessage.localPath); } From b410399a16eb73da9c49b64f7ff16c208d04d318 Mon Sep 17 00:00:00 2001 From: Zach Fox Date: Fri, 14 Apr 2017 16:26:29 -0700 Subject: [PATCH 3/3] Resolve your paths, silly! --- scripts/system/html/js/SnapshotReview.js | 3 +-- scripts/system/snapshot.js | 1 + 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/system/html/js/SnapshotReview.js b/scripts/system/html/js/SnapshotReview.js index cd650ea679..f140c54e09 100644 --- a/scripts/system/html/js/SnapshotReview.js +++ b/scripts/system/html/js/SnapshotReview.js @@ -11,7 +11,6 @@ // var paths = [], idCounter = 0, imageCount; -var loadingGifPath = '../../../resources/icons/loadingDark.gif'; function addImage(data) { if (!data.localPath) { return; @@ -85,7 +84,7 @@ 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: loadingGifPath }); + message.action.unshift({ localPath: messageOptions.loadingGifPath }); message.action.forEach(addImage); document.getElementById('p0').disabled = true; } else { diff --git a/scripts/system/snapshot.js b/scripts/system/snapshot.js index 0198866f26..6039bc09c1 100644 --- a/scripts/system/snapshot.js +++ b/scripts/system/snapshot.js @@ -239,6 +239,7 @@ function processingGifStarted(pathStillSnapshot) { { containsGif: true, processingGif: true, + loadingGifPath: Script.resolvePath(Script.resourcesPath() + 'icons/loadingDark.gif'), canShare: !!isDomainOpen(domainId), openFeedAfterShare: shouldOpenFeedAfterShare() }];