diff --git a/data/security/index.ts b/data/security/index.ts index 29b1a08f460d49f07089224d27a7e516d4a7deb0..103e9fb921e6cb44361a2827351d49c0a757b96b 100644 --- a/data/security/index.ts +++ b/data/security/index.ts @@ -148,6 +148,11 @@ const nav = { desc: 'Web Pentesting Fuzz 字典', url: 'https://github.com/TheKingOfDuck/fuzzDicts', }, + { + name: 'BurpSuitePro', + desc: '免费的BurpSuitePro版本', + url: 'https://github.com/TrojanAZhen/BurpSuitePro-2.1', + }, ] }, { diff --git a/src/utils/index.ts b/src/utils/index.ts index bf460262d0dc020e90fc6647e44dec23ee95e748..c44f157651b2183a1f896a515b81b1b24a67bfa2 100644 --- a/src/utils/index.ts +++ b/src/utils/index.ts @@ -238,6 +238,12 @@ export function imgErrorInRemove(e) { } export function isDark(): boolean { - const isDark = Boolean(Number(window.localStorage.getItem('IS_DARK'))) - return isDark + const storageVal = window.localStorage.getItem('IS_DARK') + const darkMode = window?.matchMedia?.('(prefers-color-scheme: dark)')?.matches + + if (!storageVal && darkMode) { + return darkMode + } + + return Boolean(Number(storageVal)) } diff --git a/tsconfig.json b/tsconfig.json index a4df54fff6290ad767a26006a3afa40e466e5c5f..28cb9f1673efd58ea584085d2768d12642801875 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -9,6 +9,7 @@ "experimentalDecorators": true, "module": "esnext", "moduleResolution": "node", + "resolveJsonModule": true, "importHelpers": true, "target": "es2015", "typeRoots": [