mirror of
https://github.com/nextcloud/all-in-one.git
synced 2026-05-29 15:00:09 +00:00
Rather than repeating the message, send a "magic" dot, which gets appended to the previous line. Previously the heartbeats weren't sent regulary because reading the data into a buffer caused a lag. Signed-off-by: Pablo Zmdl <pablo@nextcloud.com>
14 lines
526 B
JavaScript
14 lines
526 B
JavaScript
const observer = new MutationObserver((records) => {
|
|
const node = records[0]?.addedNodes[0];
|
|
// Text nodes also appear here but can't be scrolled to, so we have to check for the
|
|
// function being present.
|
|
if (node && typeof(node.scrollIntoView) === 'function') {
|
|
node.scrollIntoView();
|
|
if (node.classList.contains('progress-indicator')) {
|
|
node.previousSibling.append('.');
|
|
node.remove();
|
|
}
|
|
}
|
|
});
|
|
observer.observe(document, {childList: true, subtree: true});
|