diff --git a/src/app/search-manager.ts b/src/app/search-manager.ts index 254b5773b..02f6f7b8d 100644 --- a/src/app/search-manager.ts +++ b/src/app/search-manager.ts @@ -493,7 +493,7 @@ export class SearchManager implements AppModule { private highlightNewsItem(itemId: string): void { setTimeout(() => { - const item = document.querySelector(`[data-news-id="${itemId}"]`); + const item = document.querySelector(`[data-news-id="${CSS.escape(itemId)}"]`); if (item) { item.scrollIntoView({ behavior: 'smooth', block: 'center' }); item.classList.add('flash-highlight'); diff --git a/src/components/LiveNewsPanel.ts b/src/components/LiveNewsPanel.ts index a31f37fc7..268b99a7e 100644 --- a/src/components/LiveNewsPanel.ts +++ b/src/components/LiveNewsPanel.ts @@ -436,7 +436,7 @@ export class LiveNewsPanel extends Panel { this.clearBotCheckTimeout(); this.stopMuteSyncPolling(); if (this.player) { - this.player.destroy(); + if (typeof this.player.destroy === 'function') this.player.destroy(); this.player = null; } diff --git a/src/main.ts b/src/main.ts index e82d83d75..d6e851fa0 100644 --- a/src/main.ts +++ b/src/main.ts @@ -99,6 +99,15 @@ Sentry.init({ /evaluating 'elemFound\.value'/, /Cannot access '\w+' before initialization/, /^Uint8Array$/, + /createObjectStore/, + /The database connection is closing/, + /shortcut icon/, + /Attempting to change value of a readonly property/, + /reading 'nodeType'/, + /feature named .pageContext. was not found/, + /a2z\.onStatusUpdate/, + /Attempting to run\(\), but is already running/, + /this\.player\.destroy is not a function/, ], beforeSend(event) { const msg = event.exception?.values?.[0]?.value ?? ''; @@ -113,6 +122,8 @@ Sentry.init({ const appFrames = frames.filter(f => f.in_app && !/\/sentry-[A-Za-z0-9-]+\.js/.test(f.filename ?? '')); if (appFrames.length > 0 && appFrames.every(f => /\/(map|maplibre|deck-stack)-[A-Za-z0-9-]+\.js/.test(f.filename ?? ''))) return null; } + // Suppress errors originating entirely from blob: URLs (browser extensions) + if (frames.length > 0 && frames.every(f => /^blob:/.test(f.filename ?? ''))) return null; // Suppress YouTube IFrame widget API internal errors if (frames.some(f => /www-widgetapi\.js/.test(f.filename ?? ''))) return null; // Suppress Sentry SDK internal crashes (logs.js)