diff --git a/config/i18n.json b/config/i18n.json index 94015339a..72a137b15 100644 --- a/config/i18n.json +++ b/config/i18n.json @@ -377,7 +377,6 @@ "AutoRefresh": "DIM will automatically reload as long as you are still playing.", "BulkTag": "Bulk tag items", "BungieNetAlert": "Bungie Alert", - "Clarity": "The Clarity extension is no longer supported by its developers and can cause problems with DIM, such as excessive system utilization. Please uninstall it.", "Clear": "Clear search filter", "TagAs": "Tag as '{{tag}}'", "CompareMatching": "Compare Items", diff --git a/src/app/shell/Header.tsx b/src/app/shell/Header.tsx index 44d4769ba..8f140c271 100644 --- a/src/app/shell/Header.tsx +++ b/src/app/shell/Header.tsx @@ -28,7 +28,6 @@ import SearchFilter from '../search/SearchFilter'; import WhatsNewLink from '../whats-new/WhatsNewLink'; import AppInstallBanner from './AppInstallBanner'; import styles from './Header.m.scss'; -import HeaderWarningBanner from './HeaderWarningBanner'; import MenuBadge from './MenuBadge'; import PostmasterWarningBanner from './PostmasterWarningBanner'; import RefreshButton from './RefreshButton'; @@ -287,7 +286,6 @@ export default function Header() { useSetCSSVarToHeight(headerRef, '--header-height'); const headerLinksRef = useRef(null); - const clarityDetected = useClarityDetector(headerLinksRef); const streamDeckEnabled = $featureFlags.elgatoStreamDeck ? // eslint-disable-next-line react-hooks/rules-of-hooks @@ -403,11 +401,6 @@ export default function Header() { {isPhonePortrait && installable && } {$featureFlags.warnNoSync && } - {clarityDetected && ( - - {t('Header.Clarity')} - - )} {promptIosPwa && ( {t('Header.InstallDIM')}} onClose={() => setPromptIosPwa(false)}>

{t('Header.IosPwaPrompt')}

@@ -417,29 +410,3 @@ export default function Header() { ); } - -/** - * The Clarity extension is discontinued and causes memory/CPU issues in DIM. - * This detects the extension by watching for the menu item it inserts, and - * returns whether Clarity is installed. - */ -function useClarityDetector(ref: React.RefObject) { - const [clarityDetected, setClarityDetected] = useState(false); - useEffect(() => { - const observer = new MutationObserver((mutations) => { - for (const mutation of mutations) { - if ( - mutation.type === 'childList' && - Array.from(mutation.addedNodes ?? []).some( - (n) => n instanceof HTMLElement && n.classList.contains('Clarity_menu_button'), - ) - ) { - setClarityDetected(true); - } - } - }); - observer.observe(ref.current!, { subtree: true, childList: true }); - return () => observer.disconnect(); - }, [ref]); - return clarityDetected; -} diff --git a/src/locale/en.json b/src/locale/en.json index e12ff6170..3c00d6fa7 100644 --- a/src/locale/en.json +++ b/src/locale/en.json @@ -365,7 +365,6 @@ "AutoRefresh": "DIM will automatically reload as long as you are still playing.", "BulkTag": "Bulk tag items", "BungieNetAlert": "Bungie Alert", - "Clarity": "The Clarity extension is no longer supported by its developers and can cause problems with DIM, such as excessive system utilization. Please uninstall it.", "Clear": "Clear search filter", "CompareMatching": "Compare Items", "DeleteSearch": "Delete Search",