mirror of
https://github.com/esx-framework/esx_core.git
synced 2026-08-29 17:28:53 +00:00
fix(esx_progressbar): actually show colours
This commit is contained in:
@@ -18,10 +18,10 @@ $(function () {
|
||||
if (e.data.type === "Progressbar") {
|
||||
var message = e.data.message
|
||||
const replaceColors = (str, obj) => {
|
||||
let strToReplace = str
|
||||
let strToReplace = str;
|
||||
|
||||
for (let id in obj) {
|
||||
strToReplace = strToReplace.replace(new RegExp(id, 'g'), obj[id])
|
||||
strToReplace = strToReplace.replace(new RegExp(id, "g"), obj[id]);
|
||||
}
|
||||
|
||||
return strToReplace
|
||||
@@ -34,10 +34,10 @@ $(function () {
|
||||
|
||||
let newStr = replaceColors(message, objArr);
|
||||
|
||||
message = newStr;
|
||||
message = newStr
|
||||
}
|
||||
}
|
||||
$(".text").text(message)
|
||||
$(".text").html(`<p class="text">${message}</p>`)
|
||||
doc.getElementById("notifyInfo").style.display = "block";
|
||||
const start = new Date();
|
||||
const maxTime = e.data.length;
|
||||
|
||||
Reference in New Issue
Block a user