From a01b35dc43904135d6029f4e512a1620d82580b2 Mon Sep 17 00:00:00 2001 From: CnBarrier Date: Wed, 15 Apr 2026 18:23:48 +0800 Subject: [PATCH 01/10] ci: bot messages are sent using markdown v2 --- .github/workflows/check_and_release.yml | 20 +++++++++++++------- 1 file changed, 13 insertions(+), 7 deletions(-) diff --git a/.github/workflows/check_and_release.yml b/.github/workflows/check_and_release.yml index faa1aec..d5853b6 100644 --- a/.github/workflows/check_and_release.yml +++ b/.github/workflows/check_and_release.yml @@ -112,22 +112,28 @@ jobs: ZIP_FILE: "${{ github.workspace }}/MiNavBarImmerse_${{ steps.update_module_files.outputs.module_version }}.zip" run: | + escape_markdown_v2() { + python3 -c 'import re,sys; print(re.sub(r"([_*\[\]()~`>#+\-=|{}.!\\\\])", lambda m: "\\" + m.group(1), sys.stdin.read()), end="")' + } + if [ "${{ github.event_name }}" = "workflow_dispatch" ]; then - COMMIT_MESSAGE="Manually run by ${{ github.actor }}" + ESCAPED_ACTOR=$(printf '%s' "${{ github.actor }}" | escape_markdown_v2) + COMMIT_MESSAGE="Manually run by $ESCAPED_ACTOR" else RAW_MSG="${{ github.event.head_commit.message }}" - TRIMMED_MSG=$(echo "$RAW_MSG" | sed -e '1{/^$/d}' -e 's/^[[:space:]]*//' -e 's/[[:space:]]*$//') - + ESCAPED_MSG=$(printf '%s' "$RAW_MSG" | escape_markdown_v2) + ESCAPED_AUTHOR=$(printf '%s' "${{ github.event.head_commit.author.name }}" | escape_markdown_v2) + ESCAPED_URL=$(printf '%s' "${{ github.event.head_commit.url }}" | escape_markdown_v2) COMMIT_MESSAGE="New push to GitHub -
$TRIMMED_MSG
- by ${{ github.event.head_commit.author.name }} - See commit detail here" + $ESCAPED_MSG + by $ESCAPED_AUTHOR + See commit detail: $ESCAPED_URL" fi curl -F chat_id=${CHANNEL_ID} \ -F message_thread_id=39 \ -F document=@"${ZIP_FILE}" \ - -F parse_mode="HTML" \ + -F parse_mode="MarkdownV2" \ -F caption="$COMMIT_MESSAGE" \ https://api.telegram.org/bot${BOT_TOKEN}/sendDocument From c0f8c0e4d389968ee5f2591922c2e6aec1a847c9 Mon Sep 17 00:00:00 2001 From: CnBarrier Date: Wed, 15 Apr 2026 19:34:24 +0800 Subject: [PATCH 02/10] =?UTF-8?q?feat:=20add=20=E5=BE=AE=E5=8D=9A=E5=9B=BD?= =?UTF-8?q?=E9=99=85=E7=89=88,=20=E9=94=A4=E5=AD=90=E4=BE=BF=E7=AD=BE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-Authored-By: Yves.He <91321570+yves9527@users.noreply.github.com> --- changelog.md | 11 +++++++++ module/immerse_rules.json | 48 +++++++++++++++++++++++++++++++++++++++ 2 files changed, 59 insertions(+) diff --git a/changelog.md b/changelog.md index 3267e88..783bbba 100644 --- a/changelog.md +++ b/changelog.md @@ -4,6 +4,17 @@ ### 新增 +- 微博国际版 (__@Yves9527__) +- 锤子便签 (__@Yves9527__) + +### 贡献者 + +[@Yves9527](https://github.com/Yves9527) + +## 2026-04-12 + +### 新增 + - 扇贝知卡 (__@CnBarrier404__) ### 优化 diff --git a/module/immerse_rules.json b/module/immerse_rules.json index 651e881..e68a665 100644 --- a/module/immerse_rules.json +++ b/module/immerse_rules.json @@ -7169,6 +7169,54 @@ } } }, + "com.weico.international": { + "name": "微博国际版", + "enable": true, + "activityRules": { + "*": { + "mode": 1, + "color": 1 + }, + "com.weico.international.activity.LogoActivity": { + "mode": 2, + "color": 1 + }, + "com.weico.international.ui.ad.AdActivity": { + "mode": 1, + "color": 1 + }, + "com.weico.international.activity.MainFragmentActivity": { + "mode": 1, + "color": 1 + }, + "com.weico.international.activity.SeaStatusDetailActivity": { + "mode": 2, + "color": 1 + }, + "com.newimagelib.ImageDetailActivity": { + "mode": 1, + "color": -16777216 + } + } + }, + "com.smartisan.notes": { + "name": "锤子便签", + "enable": true, + "activityRules": { + "*": { + "mode": 1, + "color": 1 + }, + "com.smartisan.notes.Splash": { + "mode": 1, + "color": 1 + }, + "com.smartisan.notes.NewNotesActivity": { + "mode": 1, + "color": 1 + } + } + }, "xzr.konabess": { "name": "KonaBess", "enable": true, From b46a1a268efcb1553766c90183d3edd3155f4f2c Mon Sep 17 00:00:00 2001 From: CnBarrier404 Date: Wed, 15 Apr 2026 19:35:02 +0800 Subject: [PATCH 03/10] Release Version: 202604151935 --- module/immerse_rules.json | 96 +++++++++++++++++++-------------------- module/module.prop | 4 +- 2 files changed, 50 insertions(+), 50 deletions(-) diff --git a/module/immerse_rules.json b/module/immerse_rules.json index e68a665..f33e172 100644 --- a/module/immerse_rules.json +++ b/module/immerse_rules.json @@ -3946,6 +3946,24 @@ } } }, + "com.smartisan.notes": { + "name": "锤子便签", + "enable": true, + "activityRules": { + "*": { + "mode": 1, + "color": 1 + }, + "com.smartisan.notes.NewNotesActivity": { + "mode": 1, + "color": 1 + }, + "com.smartisan.notes.Splash": { + "mode": 1, + "color": 1 + } + } + }, "com.smile.gifmaker": { "name": "快手", "enable": true, @@ -6002,6 +6020,36 @@ } } }, + "com.weico.international": { + "name": "微博国际版", + "enable": true, + "activityRules": { + "*": { + "mode": 1, + "color": 1 + }, + "com.newimagelib.ImageDetailActivity": { + "mode": 1, + "color": -16777216 + }, + "com.weico.international.activity.LogoActivity": { + "mode": 2, + "color": 1 + }, + "com.weico.international.activity.MainFragmentActivity": { + "mode": 1, + "color": 1 + }, + "com.weico.international.activity.SeaStatusDetailActivity": { + "mode": 2, + "color": 1 + }, + "com.weico.international.ui.ad.AdActivity": { + "mode": 1, + "color": 1 + } + } + }, "com.wisedu.cpdaily": { "name": "今日校园", "enable": true, @@ -7169,54 +7217,6 @@ } } }, - "com.weico.international": { - "name": "微博国际版", - "enable": true, - "activityRules": { - "*": { - "mode": 1, - "color": 1 - }, - "com.weico.international.activity.LogoActivity": { - "mode": 2, - "color": 1 - }, - "com.weico.international.ui.ad.AdActivity": { - "mode": 1, - "color": 1 - }, - "com.weico.international.activity.MainFragmentActivity": { - "mode": 1, - "color": 1 - }, - "com.weico.international.activity.SeaStatusDetailActivity": { - "mode": 2, - "color": 1 - }, - "com.newimagelib.ImageDetailActivity": { - "mode": 1, - "color": -16777216 - } - } - }, - "com.smartisan.notes": { - "name": "锤子便签", - "enable": true, - "activityRules": { - "*": { - "mode": 1, - "color": 1 - }, - "com.smartisan.notes.Splash": { - "mode": 1, - "color": 1 - }, - "com.smartisan.notes.NewNotesActivity": { - "mode": 1, - "color": 1 - } - } - }, "xzr.konabess": { "name": "KonaBess", "enable": true, diff --git a/module/module.prop b/module/module.prop index 6ffcbaf..d03e15c 100644 --- a/module/module.prop +++ b/module/module.prop @@ -1,7 +1,7 @@ id=MiNavBarImmerse name=小米小白条沉浸优化 -version=202604121522 -versionCode=101 +version=202604151935 +versionCode=102 author=Ianzb description=通过Xiaomi HyperOS 2.2-3.3内置第三方应用小白条配置文件,实现小白条沉浸优化。 updateJson=https://drive.ianzb.cn/code/MiNavBarImmerse/update.json \ No newline at end of file From a8a1b218526ddad43166cf57aa576bda71b57e47 Mon Sep 17 00:00:00 2001 From: CnBarrier Date: Wed, 15 Apr 2026 20:14:04 +0800 Subject: [PATCH 04/10] f]ix(ci): bot commit body message MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 这次一定修好了! --- .github/workflows/check_and_release.yml | 64 +++++++++++++++---------- 1 file changed, 40 insertions(+), 24 deletions(-) diff --git a/.github/workflows/check_and_release.yml b/.github/workflows/check_and_release.yml index d5853b6..65b201e 100644 --- a/.github/workflows/check_and_release.yml +++ b/.github/workflows/check_and_release.yml @@ -110,32 +110,48 @@ jobs: CHANNEL_ID: ${{ secrets.CHANNEL_ID }} BOT_TOKEN: ${{ secrets.BOT_TOKEN }} ZIP_FILE: "${{ github.workspace }}/MiNavBarImmerse_${{ steps.update_module_files.outputs.module_version }}.zip" + RAW_MSG: "${{ github.event.head_commit.message }}" + AUTHOR_NAME: "${{ github.event.head_commit.author.name }}" + COMMIT_URL: "${{ github.event.head_commit.url }}" + RUNNER_NAME: "${{ github.actor }}" + IS_DISPATCH: "${{ github.event_name == 'workflow_dispatch' }}" run: | - escape_markdown_v2() { - python3 -c 'import re,sys; print(re.sub(r"([_*\[\]()~`>#+\-=|{}.!\\\\])", lambda m: "\\" + m.group(1), sys.stdin.read()), end="")' - } - - if [ "${{ github.event_name }}" = "workflow_dispatch" ]; then - ESCAPED_ACTOR=$(printf '%s' "${{ github.actor }}" | escape_markdown_v2) - COMMIT_MESSAGE="Manually run by $ESCAPED_ACTOR" - else - RAW_MSG="${{ github.event.head_commit.message }}" - ESCAPED_MSG=$(printf '%s' "$RAW_MSG" | escape_markdown_v2) - ESCAPED_AUTHOR=$(printf '%s' "${{ github.event.head_commit.author.name }}" | escape_markdown_v2) - ESCAPED_URL=$(printf '%s' "${{ github.event.head_commit.url }}" | escape_markdown_v2) - COMMIT_MESSAGE="New push to GitHub - $ESCAPED_MSG - by $ESCAPED_AUTHOR - See commit detail: $ESCAPED_URL" - fi - - curl -F chat_id=${CHANNEL_ID} \ - -F message_thread_id=39 \ - -F document=@"${ZIP_FILE}" \ - -F parse_mode="MarkdownV2" \ - -F caption="$COMMIT_MESSAGE" \ - https://api.telegram.org/bot${BOT_TOKEN}/sendDocument + ESCAPED_CAPTION=$(python3 -c ' + import os, json, urllib.parse, re + + def escape_md_v2(text): + return re.sub(r"([_*\[\]()~`>#+\-=|{}.!\\])", r"\\\1", text) + + is_dispatch = os.environ.get("IS_DISPATCH") == "true" + + if is_dispatch: + actor = escape_md_v2(os.environ.get("RUNNER_NAME", "")) + msg_body = f"*Manually run by* `{actor}`" + else: + raw_msg = os.environ.get("RAW_MSG", "").strip() + commit_body = raw_msg.replace("```", "``\\`").replace("\\", "\\\\") + author = escape_md_v2(os.environ.get("AUTHOR_NAME", "")) + + raw_url = os.environ.get("COMMIT_URL", "") + escaped_url = re.sub(r"([)\\])", r"\\\1", raw_url) + + msg_body = ( + "*New push to GitHub*\n" + f"```\n{commit_body}\n```" + f"by `{author}`\n" + f"See commit detail [here]({escaped_url})" + ) + + print(msg_body) + ') + + curl -v -F chat_id=${CHANNEL_ID} \ + -F message_thread_id=39 \ + -F document=@"${ZIP_FILE}" \ + -F parse_mode="MarkdownV2" \ + -F caption="${ESCAPED_CAPTION}" \ + https://api.telegram.org/bot${BOT_TOKEN}/sendDocument - name: 上传到 DUFS shell: pwsh From a133cd820a5faf6ea81057ffbd8e138bc3c9f9b4 Mon Sep 17 00:00:00 2001 From: CnBarrier404 Date: Wed, 15 Apr 2026 20:15:15 +0800 Subject: [PATCH 05/10] Release Version: 202604152015 --- module/module.prop | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/module/module.prop b/module/module.prop index d03e15c..31ee26b 100644 --- a/module/module.prop +++ b/module/module.prop @@ -1,7 +1,7 @@ id=MiNavBarImmerse name=小米小白条沉浸优化 -version=202604151935 -versionCode=102 +version=202604152015 +versionCode=103 author=Ianzb description=通过Xiaomi HyperOS 2.2-3.3内置第三方应用小白条配置文件,实现小白条沉浸优化。 updateJson=https://drive.ianzb.cn/code/MiNavBarImmerse/update.json \ No newline at end of file From 9f60bb5d260a2973483e9326f2c4b12dd5987fbf Mon Sep 17 00:00:00 2001 From: CnBarrier Date: Wed, 15 Apr 2026 20:17:25 +0800 Subject: [PATCH 06/10] =?UTF-8?q?test(ci):=20=E8=B7=91=E4=B8=80=E4=B8=AA?= =?UTF-8?q?=E8=AF=95=E8=AF=95=EF=BC=8C=E5=BA=94=E8=AF=A5=E4=B8=8D=E4=BC=9A?= =?UTF-8?q?=E7=82=B8=E5=90=A7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-Authored-By: CnBarrier --- module/immerse_rules.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/module/immerse_rules.json b/module/immerse_rules.json index f33e172..12cbd4d 100644 --- a/module/immerse_rules.json +++ b/module/immerse_rules.json @@ -7228,4 +7228,4 @@ } } } -} \ No newline at end of file +} From 203b009c7880a67272cfa442c2175e608bd3aaf3 Mon Sep 17 00:00:00 2001 From: CnBarrier404 Date: Wed, 15 Apr 2026 20:17:46 +0800 Subject: [PATCH 07/10] Release Version: 202604152017 --- module/immerse_rules.json | 2 +- module/module.prop | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/module/immerse_rules.json b/module/immerse_rules.json index 12cbd4d..f33e172 100644 --- a/module/immerse_rules.json +++ b/module/immerse_rules.json @@ -7228,4 +7228,4 @@ } } } -} +} \ No newline at end of file diff --git a/module/module.prop b/module/module.prop index 31ee26b..71015e0 100644 --- a/module/module.prop +++ b/module/module.prop @@ -1,7 +1,7 @@ id=MiNavBarImmerse name=小米小白条沉浸优化 -version=202604152015 -versionCode=103 +version=202604152017 +versionCode=104 author=Ianzb description=通过Xiaomi HyperOS 2.2-3.3内置第三方应用小白条配置文件,实现小白条沉浸优化。 updateJson=https://drive.ianzb.cn/code/MiNavBarImmerse/update.json \ No newline at end of file From 08b0b50b33569dc7463d4039b1648157b621242e Mon Sep 17 00:00:00 2001 From: "Yves.He" <91321570+Yves9527@users.noreply.github.com> Date: Thu, 16 Apr 2026 15:25:48 +0800 Subject: [PATCH 08/10] Change mode from 1 to 2 for NewNotesActivity MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 沉浸修正 --- module/immerse_rules.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/module/immerse_rules.json b/module/immerse_rules.json index f33e172..c5efbbe 100644 --- a/module/immerse_rules.json +++ b/module/immerse_rules.json @@ -3955,7 +3955,7 @@ "color": 1 }, "com.smartisan.notes.NewNotesActivity": { - "mode": 1, + "mode": 2, "color": 1 }, "com.smartisan.notes.Splash": { @@ -7228,4 +7228,4 @@ } } } -} \ No newline at end of file +} From 4a64cd32c724940c286db2bbfcbff694b990f087 Mon Sep 17 00:00:00 2001 From: "Yves.He" <91321570+Yves9527@users.noreply.github.com> Date: Thu, 16 Apr 2026 15:28:31 +0800 Subject: [PATCH 09/10] Add entry for 2026-04-16 with optimizations --- changelog.md | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/changelog.md b/changelog.md index 783bbba..9d1b350 100644 --- a/changelog.md +++ b/changelog.md @@ -1,5 +1,10 @@ # 更新日志 +## 2026-04-16 + +### 优化 +- 锤子便签修正 (__@Yves9527__) + ## 2026-04-12 ### 新增 From cecf566a80b93a81a00106429bb0ad81226f0585 Mon Sep 17 00:00:00 2001 From: CnBarrier Date: Thu, 16 Apr 2026 15:44:40 +0800 Subject: [PATCH 10/10] doc: changelog --- changelog.md | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/changelog.md b/changelog.md index 9d1b350..a2da613 100644 --- a/changelog.md +++ b/changelog.md @@ -3,9 +3,14 @@ ## 2026-04-16 ### 优化 + - 锤子便签修正 (__@Yves9527__) -## 2026-04-12 +### 贡献者 + +[@Yves9527](https://github.com/Yves9527) + +## 2026-04-15 ### 新增