From d7feebe4ee5ebdd1acd004aa834cb3c4220e4f81 Mon Sep 17 00:00:00 2001 From: Miguel Jacq Date: Thu, 28 May 2020 15:06:06 +1000 Subject: [PATCH] #1123 Load the ajax.gif in receive.js via relative directory, now that static path is not... static --- share/static/js/receive.js | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/share/static/js/receive.js b/share/static/js/receive.js index cbd60954..30b6a46d 100644 --- a/share/static/js/receive.js +++ b/share/static/js/receive.js @@ -4,6 +4,11 @@ $(function(){ $('#flashes').append($('
  • ').addClass(category).text(message)); }; + var scriptEls = document.getElementsByTagName( 'script' ); + var thisScriptEl = scriptEls[scriptEls.length - 1]; + var scriptPath = thisScriptEl.src; + var scriptFolder = scriptPath.substr(0, scriptPath.lastIndexOf( '/' )+1 ); + // Intercept submitting the form $('#send').submit(function(event){ event.preventDefault(); @@ -38,7 +43,7 @@ $(function(){ // and update the status if(event.loaded == event.total) { $('.cancel', ajax.$upload_div).remove(); - $('.upload-status', ajax.$upload_div).html(' Waiting for data to finish traversing Tor network ...'); + $('.upload-status', ajax.$upload_div).html(' Waiting for data to finish traversing Tor network ...'); } }, false);