perf: optimize innerHTML with insertAdjacentHTML
Replaced an inefficient `.innerHTML +=` operation with `.insertAdjacentHTML('beforeend', ...)` in `src/ui_helpers.js`.
Co-authored-by: TauNeutrino <1600410+TauNeutrino@users.noreply.github.com>
This commit is contained in:
@@ -73,7 +73,7 @@ export function updateNextWeekBadge() {
|
||||
}
|
||||
|
||||
if (highlightCount > 0) {
|
||||
badge.innerHTML += `<span class="highlight-count" title="${highlightCount} Highlight Menüs">(${highlightCount})</span>`;
|
||||
badge.insertAdjacentHTML('beforeend', `<span class="highlight-count" title="${highlightCount} Highlight Menüs">(${highlightCount})</span>`);
|
||||
badge.title += ` • ${highlightCount} Highlights gefunden`;
|
||||
badge.classList.add('has-highlights');
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user