comparison s4-main.js @ 992:17cdef0e8767 draft

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
comparison
equal deleted inserted replaced
991:b563e1ff9e74 992:17cdef0e8767
854 outcsv.push({ 854 outcsv.push({
855 "author": author, "name": name, "time": time, 855 "author": author, "name": name, "time": time,
856 "id": "#"+id, "body": body}); 856 "id": "#"+id, "body": body});
857 } 857 }
858 let line = new CSV(outcsv, {header:true}).encode(), 858 let line = new CSV(outcsv, {header:true}).encode(),
859 fn = myurl.replace(/.*\?/, "").replace("+", "-").replace(/#.*/, ""); 859 fn = myurl.replace(/.*\?/, "").replaceAll("+", "-")
860 .replace(/#.*/, "").replace("-n:all", "");
860 downloadFile(fn+".csv", line); 861 downloadFile(fn+".csv", line);
861 } 862 }
862 function getTextContentCSV(e) { 863 function getTextContentCSV(e) {
863 if (!document.getElementById("csvminjs")) { 864 if (!document.getElementById("csvminjs")) {
864 let csvmin = document.createElement("script"); 865 let csvmin = document.createElement("script");

yatex.org