diff --git a/astro.config.mjs b/astro.config.mjs index 5d02ae8..ab537f7 100644 --- a/astro.config.mjs +++ b/astro.config.mjs @@ -23,6 +23,7 @@ import { parseDirectiveNode } from "./src/plugins/remark-directive-rehype.js"; import { remarkExcerpt } from "./src/plugins/remark-excerpt.js"; import { remarkReadingTime } from "./src/plugins/remark-reading-time.mjs"; import { pluginCustomCopyButton } from "./src/plugins/expressive-code/custom-copy-button.js"; +import rehypeExternalLinks from 'rehype-external-links'; // https://astro.build/config export default defineConfig({ @@ -128,6 +129,12 @@ export default defineConfig({ }, }, ], + [ + rehypeExternalLinks, + { + target: '_blank', + }, + ], [ rehypeAutolinkHeadings, { diff --git a/package.json b/package.json index 9cf9641..28a54e5 100644 --- a/package.json +++ b/package.json @@ -48,6 +48,7 @@ "reading-time": "^1.5.0", "rehype-autolink-headings": "^7.1.0", "rehype-components": "^0.3.0", + "rehype-external-links": "^3.0.0", "rehype-katex": "^7.0.1", "rehype-slug": "^6.0.0", "remark-directive": "^3.0.1", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 9738c21..7f0712f 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -104,6 +104,9 @@ importers: rehype-components: specifier: ^0.3.0 version: 0.3.0 + rehype-external-links: + specifier: ^3.0.0 + version: 3.0.0 rehype-katex: specifier: ^7.0.1 version: 7.0.1 @@ -3018,6 +3021,10 @@ packages: iron-webcrypto@1.2.1: resolution: {integrity: sha512-feOM6FaSr6rEABp/eDfVseKyTMDt+KGpeB35SkVn9Tyn0CqvVsY3EwI0v5i8nMHyJnzCIQf7nsy3p41TPkJZhg==} + is-absolute-url@4.0.1: + resolution: {integrity: sha512-/51/TKE88Lmm7Gc4/8btclNXWS+g50wXhYJq8HWIBAGUBnoAdRu1aXeh364t/O7wXDAcTJDP8PNuNKWUDWie+A==} + engines: {node: ^12.20.0 || ^14.13.1 || >=16.0.0} + is-alphabetical@2.0.1: resolution: {integrity: sha512-FWyyY60MeTNyeSRpkM2Iry0G9hpr7/9kD40mD/cGQEuilcZYS4okz8SN2Q6rLCJ8gbCt6fN+rC+6tMGS99LaxQ==} @@ -4312,6 +4319,9 @@ packages: rehype-expressive-code@0.41.3: resolution: {integrity: sha512-8d9Py4c/V6I/Od2VIXFAdpiO2kc0SV2qTJsRAaqSIcM9aruW4ASLNe2kOEo1inXAAkIhpFzAHTc358HKbvpNUg==} + rehype-external-links@3.0.0: + resolution: {integrity: sha512-yp+e5N9V3C6bwBeAC4n796kc86M4gJCdlVhiMTxIrJG5UHDMh+PJANf9heqORJbt1nrCbDwIlAZKjANIaVBbvw==} + rehype-katex@7.0.1: resolution: {integrity: sha512-OiM2wrZ/wuhKkigASodFoo8wimG3H12LWQaH8qSPVJn9apWKFSH3YOCtbKpBorTVw/eI7cuT21XBbvwEswbIOA==} @@ -8653,6 +8663,8 @@ snapshots: iron-webcrypto@1.2.1: {} + is-absolute-url@4.0.1: {} + is-alphabetical@2.0.1: {} is-alphanumerical@2.0.1: @@ -10144,6 +10156,15 @@ snapshots: dependencies: expressive-code: 0.41.3 + rehype-external-links@3.0.0: + dependencies: + '@types/hast': 3.0.4 + '@ungap/structured-clone': 1.3.0 + hast-util-is-element: 3.0.0 + is-absolute-url: 4.0.1 + space-separated-tokens: 2.0.2 + unist-util-visit: 5.0.0 + rehype-katex@7.0.1: dependencies: '@types/hast': 3.0.4 diff --git a/src/components/widget/Profile.astro b/src/components/widget/Profile.astro index 301b3eb..bead0de 100644 --- a/src/components/widget/Profile.astro +++ b/src/components/widget/Profile.astro @@ -55,6 +55,11 @@ const isSunday = new Date().getDay() === 0; {isSunday && } + + + {!isSunday && + + } diff --git a/src/content/assets/images/chrome-139.0.7258.128-about.png b/src/content/assets/images/chrome-139.0.7258.128-about.png new file mode 100644 index 0000000..deb4a20 Binary files /dev/null and b/src/content/assets/images/chrome-139.0.7258.128-about.png differ diff --git a/src/content/assets/images/chrome-ext-block.png b/src/content/assets/images/chrome-ext-block.png new file mode 100644 index 0000000..f8e48c0 Binary files /dev/null and b/src/content/assets/images/chrome-ext-block.png differ diff --git a/src/content/assets/images/chrome-ext-force-custom-font-2.png b/src/content/assets/images/chrome-ext-force-custom-font-2.png new file mode 100644 index 0000000..b51e1bb Binary files /dev/null and b/src/content/assets/images/chrome-ext-force-custom-font-2.png differ diff --git a/src/content/assets/images/chrome-ext-force-custom-font.png b/src/content/assets/images/chrome-ext-force-custom-font.png new file mode 100644 index 0000000..2bfa67c Binary files /dev/null and b/src/content/assets/images/chrome-ext-force-custom-font.png differ diff --git a/src/content/assets/images/windows-chrome-lnk-panel.png b/src/content/assets/images/windows-chrome-lnk-panel.png new file mode 100644 index 0000000..3b004a2 Binary files /dev/null and b/src/content/assets/images/windows-chrome-lnk-panel.png differ diff --git a/src/content/posts/captcha.md b/src/content/posts/captcha.md index 0101765..b007609 100644 --- a/src/content/posts/captcha.md +++ b/src/content/posts/captcha.md @@ -23,10 +23,6 @@ customcover: ../assets/images/cloudflare-turnstile-verify-error.png 你好~ 我的 Captcha 还蛮多的,欢迎你们来这里玩,玩累了就直接刷新,没问题的~ -:::NOTE[抱歉] -现在只有两家 Captcha,后续会慢慢补上其他 Captcha 的! -::: - # Google reCaptcha V2 ## 休闲版(不保证)
diff --git a/src/content/posts/chrome-manifestv2-block.md b/src/content/posts/chrome-manifestv2-block.md new file mode 100644 index 0000000..455cc2b --- /dev/null +++ b/src/content/posts/chrome-manifestv2-block.md @@ -0,0 +1,64 @@ +--- +title: 恢复 Chrome 对 Manifest V2 的支持 +published: 2025-08-14 +tags: ["bypass"] +description: 2025 年 7 月 24 日:Chrome 会在所有位置停用 Manifest V2 扩展,所以某些扩展要怎么恢复? +image: ../assets/images/chrome-ext-block.png +showcover: false +customcover: ../assets/images/chrome-ext-force-custom-font.png +category: 教程 +draft: false +--- + +# 前言 + +:::tip[提示] +本文「扩展」=「扩展程序」= 「插件」。 +参考:https://blog.hentioe.dev/posts/continue-using-chrome-manifest-v2.html +::: + +今天打开电脑,发现 Chrome 它阻止了一个扩展(如上图)。 +查了一下,发现是 Google Chrome 已经永久停止了对 Manifest V2 扩展的支持,而且是已经计划了近4年的项目。在 2025年7月终于要落下帷幕**了**: + +- [2022 年 1 月:Chrome 应用商店停止接受新的 Manifest V2 扩展程序](https://developer.chrome.com/docs/extensions/develop/migrate/mv2-deprecation-timeline?hl=zh-cn#january_2022_chrome_web_store_-_no_new_public_unlisted_extensions) +- [2022 年 6 月:Chrome 应用商店已停止接受将公开范围设置为“专用”的新 Manifest V2 扩展程序](https://developer.chrome.com/docs/extensions/develop/migrate/mv2-deprecation-timeline?hl=zh-cn#june_2022_chrome_web_store_-_no_new_private_extensions) +- [2024 年 6 月 3 日:Chrome 开始逐步淘汰 Manifest V2](https://developer.chrome.com/docs/extensions/develop/migrate/mv2-deprecation-timeline?hl=zh-cn#june_3rd_2024_the_manifest_v2_phase-out_begins) +- [2024 年 10 月 9 日:Chrome 扩展页面会向使用 Manifest V2 扩展程序的所有用户显示警告横幅](https://developer.chrome.com/docs/extensions/develop/migrate/mv2-deprecation-timeline?hl=zh-cn#october_9th_2024_an_update_on_manifest_v2_phase-out) +- [2025 年 3 月 31 日:停用 Manifest V2,但仍可以选择重新启用扩展程序](https://developer.chrome.com/docs/extensions/develop/migrate/mv2-deprecation-timeline?hl=zh-cn#march_31st_2025_manifest_v2_is_disabled_with_the_option_to_re-enable_extensions) +- [2025 年 7 月 24 日:在所有位置停用 Manifest V2](https://developer.chrome.com/docs/extensions/develop/migrate/mv2-deprecation-timeline?hl=zh-cn#jul_24th_2025_manifest_v2_is_disabled_everywhere) + +**吗?** + +# 解决方案 +## 通过 chrome://flags 关闭 +:::warning[注意] +目前并不能确认 Chrome 139.0.7258.128 之后的版本是否能继续使用此方法。但可以确定的是,稳定版 139.0.7258.128 能继续使用 Flags 控制开关。 + +::: + +1. 地址栏输入 `chrome://flags/`。 +2. 搜索 `temporary-unexpire-flags-m137`。 +3. 将这个条目设置为 `Enabled`。 +4. 重启浏览器。 +5. 搜索 `extension-manifest-v2-deprecation-disabled`,将其设置为 `Disabled`。 +6. 搜索 `extension-manifest-v2-deprecation-unsupported`,将其设置为 `Disabled`。 +7. 重启浏览器,即可启用旧版扩展。 + +## 添加启动参数 + + +1. 关闭 Chrome。 +2. 打开 Chrome 的快捷方式属性。 +3. 在 **目标** 后加上一个**空格**和 `--disable-features=ExtensionManifestV2Unsupported,ExtensionManifestV2Disabled`。 +4. 点击 **确定**。 +5. 再次双击 Chrome 快捷方式,打开 Chrome,即可启用旧版扩展(**暂时保留** 按钮将会出现)。  + +## 换浏览器 +### FireFox +[FireFox - 火狐](https://www.firefox.com/zh-CN/) 。它并**不**基于 Chromium :[FireFox 常见问题](https://www.firefox.com/zh-CN/more/faq/) 。并且它将会 [继续支持 Manifest V2 扩展](https://blog.mozilla.org/addons/2024/03/13/manifest-v3-manifest-v2-march-2024-update/) 。~FireFox 这招太狠了~ + +--- + +# 其他 +## Microsoft Edge +好吧,微软也放弃了其新 Edge 对 Manifest V2 的支持,强制关闭时间**待定**:[迁移到清单 V3 的概述和时间线 - Microsoft Edge Developer documentation | Microsoft Learn](https://learn.microsoft.com/zh-cn/microsoft-edge/extensions/developer-guide/manifest-v3) 。 diff --git a/src/content/posts/custom-frontmatter.md b/src/content/posts/custom-frontmatter.md index 79c52ac..15e31f9 100644 --- a/src/content/posts/custom-frontmatter.md +++ b/src/content/posts/custom-frontmatter.md @@ -14,6 +14,17 @@ customcover: ../assets/images/custom-frontmatter-customcover.svg 这篇文章的目的是 **在 Markdown 文件的顶端加入一个自定义的类似 `draft: true` 这类变量控制器**,可以运用它对某些组件进行更改,包括关闭、更改。例如,当你在 fuwari 中的 Markdown 顶端定义一个内置参数 `image`,你可以通过写 `image: "../assets/images/custom-frontmatter-cover.svg"` 来让这篇文章在**博客主页**获得一个图片(而不定义就只有一个 `>` 的按钮):  +就是说: + +```md title="src/content/posts/custom-frontmatter.md" {3,4} +--- # 这里是 Frontmatter 的开头 +image: /a/example.png # 官方自带的:这是原来有的这个 image: +customcover: /a/eexxaammppllee.png # 自己添加的:这是在如 /posts/custom-frontmatter/ 显示的文章头图 +showcover: false # 自己添加的:这是控制 是否使用 image: 定义的图片作为文章头图,默认就是会用 image: 定义的图片作为头图 +--- # 这里是 Frontmatter 的结尾 +``` + + 如果你足够细心,你会发现文章 [你是人类吗?](/posts/captcha/) 的图片在**博客主页**和**文章内部**是不同的。这也用到了自定义 Frontmatter,自己定义了不同的地方该显示什么图片。 # 定义 Frontmatter @@ -100,7 +111,7 @@ const postsCollection = defineCollection({ :::CAUTION[不要照抄,除非你知道自己在做什么] ::: -```astro title="src/pages/posts/[...slug].astro" {49,52} +```astro title="src/pages/posts/[...slug].astro" {49,52,107,112} --- import path from "node:path"; import License from "@components/misc/License.astro"; diff --git a/src/content/spec/about.md b/src/content/spec/about.md index 562f7ca..9c37aef 100644 --- a/src/content/spec/about.md +++ b/src/content/spec/about.md @@ -8,7 +8,7 @@ ::github{repo="afoim/fuwari"} # 域名 -目前你现在见到的,也就是 [adclosenn.top](https://adclosenn.top)。除了这个,我还有其他的域名(部分): +目前你现在见到的,也就是 [adclosenn.top](https://adclosenn.top) 。除了这个,我还有其他的域名(部分): 1. adclosenn.top 2. 19991230.xyz @@ -21,28 +21,35 @@ 一位住在[中华人民共和国广西壮族自治区](https://baike.baidu.com/item/%E5%B9%BF%E8%A5%BF%E5%A3%AE%E6%97%8F%E8%87%AA%E6%B2%BB%E5%8C%BA/163178)的苦逼学生。 ## 爱好 -玩游戏、写代码、写博客(也许吧),哦,还有读书。只会一点 [Python](https://baike.baidu.com/item/Python/407313),初学者罢了。 +玩游戏、写代码、写博客,哦,还有读书。只会一点 [Python](https://baike.baidu.com/item/Python/407313),初学者罢了。 ## 联系方式 -电子邮箱:[1709301095@qq.com](mailto:1709301095@qq.com) 或 [W1709301095@gmail.com](mailto:W1709301095@gmail.com) +电子邮箱:[1709301095@qq.com](mailto:1709301095@qq.com) 或 [admin@adclosenn.top](mailto:admin@adclosenn.top) Discord:https://discord.com/users/1068060784300658688 --- # 关于本站 ## 字体 -使用的是 [MiSans VF](https://hyperos.mi.com/font),中英文可变字重字体从官方 CDN 服务器获取。 +使用的是 [MiSans VF](https://hyperos.mi.com/font) ,中英文可变字重字体从官方 CDN 服务器获取。 [点此查看详情](/misans/) ## 一言 -使用的是 [一言语句接口(JSON)](https://developer.hitokoto.cn/sentence/)。`v1.hitokoto.cn` +使用的是 [一言语句接口(JSON)](https://developer.hitokoto.cn/sentence/) 。`v1.hitokoto.cn` ## 统计信息 -使用的是自托管([Netlify](https://www.netlify.com) + [Neon](https://neon.com))的 [Umami](https://umami.is)。具体可查看 [手把手自托管 Umami -](/posts/umami/) +使用的是自托管( [Netlify](https://www.netlify.com) + [Neon](https://neon.com))的 [Umami](https://umami.is) 。具体可查看 [手把手自托管 Umami +](/posts/umami/) 。 + +## 音乐 +使用的是 [网易云音乐外链播放器(iframe 插件)](https://music.163.com/#/outchain/2/2608813264/) 。 --- +# 2025/8/14 +用上了大佬插件 [@rehypejs/rehype-external-links](https://www.npmjs.com/package/rehype-external-links) ,这个插件可以让仅 Markdown 文件里面定义的链接以 `target="_blank` 的形式构建。也就是通过这个插件构建出来的超链接,点击后是通过新标签页打开的。而原来原版是直接在博客里,通过覆盖你正在阅读的文章来打开链接。 +可以试试点这两个链接进行比对: [更改后](https://www.bing.com) | 更改前 + # 2025/8/10 ~~1145141919**810**~~ ::github{repo="carbon-app/carbon"}