diff --git a/components/video-modal.html b/components/video-modal.html index 0a77155b..89a359c1 100644 --- a/components/video-modal.html +++ b/components/video-modal.html @@ -175,7 +175,13 @@
diff --git a/js/ui/components/VideoModal.js b/js/ui/components/VideoModal.js index 89fd1d93..e1501194 100644 --- a/js/ui/components/VideoModal.js +++ b/js/ui/components/VideoModal.js @@ -3959,8 +3959,17 @@ export class VideoModal { } updateViewCountLabel(text) { - if (this.videoViewCountEl) { - this.videoViewCountEl.textContent = text || ""; + if (!this.videoViewCountEl) { + return; + } + const textEl = this.videoViewCountEl.querySelector( + "[data-view-count-text]" + ); + if (textEl) { + textEl.textContent = text || "–"; + } else { + // Fallback if span is missing + this.videoViewCountEl.textContent = text || "–"; } } @@ -5438,15 +5447,14 @@ export class VideoModal { return this.formatViewCountLabel(Number(total)); } if (status === "hydrating") { - return "Loading views…"; + return "Loading…"; } - return "– views"; + return "–"; } formatViewCountLabel(total) { const numeric = Number.isFinite(total) ? Math.max(0, Number(total)) : 0; - const label = numeric === 1 ? "view" : "views"; - return `${formatViewCount(numeric)} ${label}`; + return formatViewCount(numeric); } syncMoreMenuData({ currentVideo, canManageBlacklist }) {