chore: 通過 ESM 引入外部脚本

* React, ReactDOM 和 CryptoES
* 集中在 Imports.ts 中
* 向每一個 JSX 添加 React 的 import
This commit is contained in:
CrescentLeaf
2025-09-06 14:32:56 +08:00
parent b0c67da340
commit c5d1f11017
13 changed files with 104 additions and 68 deletions

View File

@@ -1,8 +1,10 @@
import { CryptoES } from './Imports.ts'
const dataIsEmpty = !localStorage.tws_data || localStorage.tws_data == ''
const aes = {
enc: (m: string, k: string) => CryptoJS.AES.encrypt(m, k).toString(),
dec: (m: string, k: string) => CryptoJS.AES.decrypt(m, k).toString(CryptoJS.enc.Utf8),
enc: (m: string, k: string) => CryptoES.AES.encrypt(m, k).toString(CryptoES.enc.Utf8),
dec: (m: string, k: string) => CryptoES.AES.decrypt(m, k).toString(CryptoES.enc.Utf8),
}
const key = location.host + '_TWS_姐姐'