From 850ab41f8141891287fd0b3c59e4f31c8221b7a7 Mon Sep 17 00:00:00 2001 From: Rico040 <93081680+Rico040@users.noreply.github.com> Date: Fri, 5 Jul 2024 21:40:11 +0900 Subject: [PATCH 1/2] chore: bump node version --- .github/workflows/deploy.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 87adf2f..9c7e586 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -9,12 +9,12 @@ jobs: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 - name: Prepare environment - uses: actions/setup-node@v2 + uses: actions/setup-node@v3 with: - node-version: "16" + node-version: "20" - run: npm install --global pnpm From 708ee3fa90c2333f377bf620c2c515202fd4692f Mon Sep 17 00:00:00 2001 From: Rico040 <93081680+Rico040@users.noreply.github.com> Date: Sat, 6 Jul 2024 00:14:15 +0900 Subject: [PATCH 2/2] HideGiftButton: actually block by type --- plugins/HideGiftButton/src/index.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/plugins/HideGiftButton/src/index.ts b/plugins/HideGiftButton/src/index.ts index 0b653cb..1d495d8 100644 --- a/plugins/HideGiftButton/src/index.ts +++ b/plugins/HideGiftButton/src/index.ts @@ -10,9 +10,11 @@ let unpatch: () => boolean; export default { onLoad() { const blockList = ["ic_thread_normal_24px", "ic_gift"].map(n => getAssetIDByName(n)); + const blockTypeList = [6]; unpatch = after("render", ChatInput.prototype, (_, ret) => { const input = findInReactTree(ret, t => "forceAnimateButtons" in t.props && t.props.actions); - input.props.actions = input.props.actions.filter(a => !blockList.includes(a.source)); + input.props.actions = input.props.actions.filter(a => + !blockList.includes(a.source) && !blockTypeList.includes(a.type)); }); }, onUnload: unpatch