listInputFiles(val) {
setTimeout(() => {
let c = document.getElementById("fls").children;
for (let i = 0; i < val.length; i++) {
let st = val[i].status;
switch (st) {
case "add":
c[i].classList.add("add");
break;
case "raw":
c[i].classList.add("raw");
break;
}
}
}, 0);
}
String.prototype.replaceAll = function(searchStr, replaceStr) {
var str = this;
// escape regexp special characters in search string
searchStr = searchStr.replace(/[-\/\\^$*+?.()|[\]{}]/g, '\\$&');
return str.replace(new RegExp(searchStr, 'gi'), replaceStr);
};
// usage:
str.replaceAll('hello', 'hi');