Link Cleaner

对付“超不链接”和跟踪/推广参数的网站链接清洗器

TransparentLC/link-cleaner: 网站链接清洗器

https://github.com/TransparentLC/link-cleaner


关于项目

这个项目受油猴脚本“Open the F**king URL Right Now”“redirect 外链跳转”的启发,作用是对以下类型的超链接进行“净化”处理:

使用方式

提供油猴脚本和 Cloudflare Workers 两种使用方式。

油猴脚本

https://i.akarin.dev/link-cleaner.user.js

脚本会对网页上所有 <a> 标签指向的链接进行清洗。如果你当前打开的页面的 URL 本身可以被清洗,则脚本也会自动跳转到清洗过的 URL。

此外,也可以在菜单中选择手动清洗网页上的所有链接(用于动态添加 <a> 标签的情况)。

Cloudflare Workers

https://i.akarin.dev/link-cleaner/?url=https://example.com/

https://i.akarin.dev/link-cleaner/?title&url=https://example.com/

使用 url 参数输入链接,将返回清洗后的结果。

如果需要获取这个链接对应的网页的标题(<title>),可以在请求时添加 title 参数。

也可以使用 POST 发送带有链接的文本,将文本中的链接清洗后返回。

curl \
    --data-raw \
    "【淘宝】https://m.tb.cn/h.5Iub7ZVrhwMSERL?sm=xxxxxx?tk=xxxxxxxxxxx ZH4920 「【AmiAmi】Gift 东方 古明地恋 古明地觉 东风谷早苗 fumo」点击链接直接打开 或者 淘宝搜索直接打开" \
    https://i.akarin.dev/link-cleaner/

# 【淘宝】https://item.taobao.com/item.htm?id=754327895246 ZH4920 「【AmiAmi】Gift 东方 古明地恋 古明地觉 东风谷早苗 fumo」点击链接直接打开 或者 淘宝搜索直接打开