diff --git a/src/titles/titleRenderer.ts b/src/titles/titleRenderer.ts index 97d19d1..1bb3f48 100644 --- a/src/titles/titleRenderer.ts +++ b/src/titles/titleRenderer.ts @@ -154,7 +154,9 @@ function showOriginalTitle(element: HTMLElement, brandingLocation: BrandingLocat if (Config.config!.showOriginalOnHover) { findShowOriginalButton(originalTitleElement, brandingLocation).then((buttonElement) => { - buttonElement.title = originalTitleElement.textContent ?? ""; + if (buttonElement) { + buttonElement.title = originalTitleElement.textContent ?? ""; + } }).catch(logError); } @@ -195,7 +197,9 @@ function showCustomTitle(element: HTMLElement, brandingLocation: BrandingLocatio if (Config.config!.showOriginalOnHover) { findShowOriginalButton(originalTitleElement, brandingLocation).then((buttonElement) => { - buttonElement.title = titleElement.textContent ?? ""; + if (buttonElement) { + buttonElement.title = titleElement.textContent ?? ""; + } }).catch(logError); } diff --git a/src/videoBranding/videoBranding.ts b/src/videoBranding/videoBranding.ts index a0083cf..2580679 100644 --- a/src/videoBranding/videoBranding.ts +++ b/src/videoBranding/videoBranding.ts @@ -417,7 +417,8 @@ export function setupOptionChangeListener(): void { "alwaysShowShowOriginalButton", "channelOverrides", "showIconForFormattedTitles", - "ignoreAbThumbnails" + "ignoreAbThumbnails", + "showOriginalOnHover" ]; if (settingsToReload.some((name) => (changes[name] && changes[name].newValue !== changes[name].oldValue))) {