Twitter/X Emoji Fix

Replace Twitter web's image emoji with native emoji for easier tweet content copying

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!)

Autor
1zero
Dnevne instalacije
0
Ukupnih instalacija
5
Ocjene
0 0 0
Verzija
1.1
Stvoreno
13.11.2025.
Ažurirano
15.12.2025.
Size
4,35 KB
Licenza
MIT
Primjenjuje se

Twitter/X Emoji Fix - 推特 Emoji 图片替换脚本

将 Twitter/X 网页端的图片格式 emoji 替换为原生可复制的 emoji 字符,解决复制推文时 emoji 丢失的问题。

工作原理

  1. 识别 emoji 图片: 查找所有包含 /emoji/v2/svg/ 路径的 <img> 标签

  2. 提取 Unicode 码点: 从 URL 中提取十六进制码点(如 1f3ac.svg1F3AC

  3. 转换为原生 emoji: 使用 String.fromCodePoint() 将码点转换为 emoji 字符

  4. 替换元素: 创建 <span> 元素包含原生 emoji,替换原始 <img> 标签

  5. 监听动态内容: 使用 MutationObserver 监听 DOM 变化,自动处理新加载的内容