Linux.do 语音消息

为 linux.do 编辑器提供语音录制、上传与播放能力。

As of 2026-03-06. See the latest version.

You will need to install an extension such as Tampermonkey, Greasemonkey or Violentmonkey to install this script.

You will need to install an extension such as Tampermonkey to install this script.

You will need to install an extension such as Tampermonkey or Violentmonkey to install this script.

You will need to install an extension such as Tampermonkey or Userscripts to install this script.

You will need to install an extension such as Tampermonkey to install this script.

You will need to install a user script manager extension to install this script.

(I already have a user script manager, let me install it!)

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

You will need to install a user style manager extension to install this style.

You will need to install a user style manager extension to install this style.

You will need to install a user style manager extension to install this style.

(I already have a user style manager, let me install it!)

Author
helloai
Ratings
0 0 0
Version
1.0.0
Created
2026-03-06
Updated
2026-03-06
Size
174 KB
License
MIT
Applies to

Linux.do 语音消息

一个面向 https://linux.do/* 的油猴脚本项目,为 Discourse 编辑器提供内联语音录制、上传,以及帖子内语音消息播放器替换能力。

项目基于 Svelte 5 + TypeScript + Vite + vite-plugin-monkey 构建。

当前能力

  • 在编辑器工具栏中注入录音按钮。
  • 点击录音按钮后,直接在编辑区内展开内联录音条,不使用弹窗。
  • 录音条支持:开始录音、暂停/继续、删除、发送、上传进度提示。
  • 录音优先使用 Opus,不支持时回退到 MP3
  • 录音固定码率 64 kbps,最长 5 分钟,并在上传前做最终大小校验。
  • 上传时自动走 Discourse 同源上传接口 /uploads.json,自动处理 CSRF Token。
  • 上传成功后自动向编辑器插入标准 Markdown: