s4

changeset 992:17cdef0e8767

Remove trailing suffixes from file name(CSVget)
author HIROSE Yuuji <yuuji@gentei.org>
date Fri, 14 Oct 2022 23:19:56 +0859
parents b563e1ff9e74
children 83119d97a2f2
files s4-main.js
diffstat 1 files changed, 2 insertions(+), 1 deletions(-) [+]
line diff
     1.1 --- a/s4-main.js	Fri Oct 14 23:13:18 2022 +0859
     1.2 +++ b/s4-main.js	Fri Oct 14 23:19:56 2022 +0859
     1.3 @@ -856,7 +856,8 @@
     1.4  		"id": "#"+id, "body": body});
     1.5  	}
     1.6  	let line = new CSV(outcsv, {header:true}).encode(),
     1.7 -	    fn = myurl.replace(/.*\?/, "").replace("+", "-").replace(/#.*/, "");
     1.8 +	    fn = myurl.replace(/.*\?/, "").replaceAll("+", "-")
     1.9 +	    .replace(/#.*/, "").replace("-n:all", "");
    1.10  	downloadFile(fn+".csv", line);
    1.11      }
    1.12      function getTextContentCSV(e) {