Update the message content after a short timeout, to fix coloring, and add parenthesis
This commit is contained in:
parent
990571307a
commit
eb1c6d943a
@ -50,7 +50,9 @@ function checkNewMessages() {
|
||||
const name = rootNode.firstChild.firstChild.innerHTML;
|
||||
const dTime = displayTime(completionTime);
|
||||
messages.push({completionTime: completionTime, name: name, text: e.innerHTML, displayTime: dTime});
|
||||
e.innerHTML = `<span style="color: red; margin-right: 5px;">${dTime}</span>${e.innerHTML}`
|
||||
setTimeout(() => {
|
||||
e.innerHTML = `(<span style="color: red;">${dTime}</span>) ${e.innerHTML}`;
|
||||
}, 20);
|
||||
}
|
||||
chrome.storage.local.set({ messages: messages });
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user