From 7fce9c5d1276c61b3344fd080c5d9d19fd4db8ce Mon Sep 17 00:00:00 2001 From: salman Date: Wed, 11 Jan 2023 22:40:43 +0100 Subject: [PATCH] Unified web and standalone versions done. --- TrimSPlib.js | 2 +- TrimSPweb.js | 14 +++++++++++++- 2 files changed, 14 insertions(+), 2 deletions(-) diff --git a/TrimSPlib.js b/TrimSPlib.js index 865b751..dc51cb2 100644 --- a/TrimSPlib.js +++ b/TrimSPlib.js @@ -1122,7 +1122,7 @@ function startSequence(All) { } } // Update GUI progress bar - Progress=Progress+90/SValues.length; + Progress=Math.round(Progress+90/SValues.length); document.getElementById("pBar").style.width = Progress + "%"; document.getElementById("pBar").innerHTML = Progress + "%"; diff --git a/TrimSPweb.js b/TrimSPweb.js index d54f4f9..3705990 100644 --- a/TrimSPweb.js +++ b/TrimSPweb.js @@ -20,6 +20,7 @@ function writeAsciiFile(filename,content) { // Prepare CGI args let cgiargs = "?fn="+filename; let lines = content.split(/\n/); + let prefix = filename.split(/\//); for (let i=0; i"; + htmlLink += prefix[2] + ".tgz"; + d.innerHTML = htmlLink; + document.body.appendChild(d); + } return(1); }