Don't need dark-reader exception anymore

This commit is contained in:
Dustin Brett 2024-02-11 20:42:48 -08:00
parent 2624f645e8
commit 5ac28949b6
2 changed files with 0 additions and 17 deletions

View file

@ -1,15 +0,0 @@
import { useEffect } from "react";
export const useExtensionDisabler = (): void => {
useEffect(() => {
// https://github.com/darkreader/darkreader/blob/main/CONTRIBUTING.md#disabling-dark-reader-on-your-site
// TODO: Remove once in https://github.com/darkreader/darkreader/blob/main/src/config/dark-sites.config
if ("darkreaderMode" in document.documentElement.dataset) {
const metaDarkReaderOff = document.createElement("meta");
metaDarkReaderOff.name = "darkreader-lock";
document.head.append(metaDarkReaderOff);
}
}, []);
};

View file

@ -6,14 +6,12 @@ import useGlobalErrorHandler from "hooks/useGlobalErrorHandler";
import useGlobalKeyboardShortcuts from "hooks/useGlobalKeyboardShortcuts";
import useIFrameFocuser from "hooks/useIFrameFocuser";
import useUrlLoader from "hooks/useUrlLoader";
import { useExtensionDisabler } from "hooks/useExtensionDisabler";
const Index = (): React.ReactElement => {
useIFrameFocuser();
useUrlLoader();
useGlobalKeyboardShortcuts();
useGlobalErrorHandler();
useExtensionDisabler();
return (
<Desktop>