anti-redirect

GM脚本, 去除各搜索引擎/常用网站的重定向

Usage no npm install needed!

<script type="module">
  import antiRedirect from 'https://cdn.skypack.dev/anti-redirect';
</script>

README

GM 脚本,反重定向

Build Status npm version Greenkeeper badge Node License

去除各搜索引擎/常用网站的重定向

反馈地址

反馈最好能带上出问题的网页地址

如果这能够帮助到你, 不妨点个 star, 你的支持就是我更新的动力

点击从 Github 安装

点击从 GreasyFork 安装

工作原理

  1. 根据 URL 上暴露出来的跳转链接,正则匹配提取真实的地址,例如知乎,Google
  2. 如果 A 标签的内容为真实的地址,则替换,例如百度贴吧
  3. 逐一发送请求,获取真实的地址,例如百度搜索
  4. 根据请求特殊页面,这个特殊页面没有重定向地址,然后覆盖当前页,例如百度搜索,搜狗搜索
  5. 覆盖原本的链接点击事件,比如 qq 邮箱

更新日志

https://github.com/axetroy/anti-redirect/blob/master/CHANGELOG.md

支持的站点

  • 知乎
  • 知乎专栏
  • 知乎日报
  • Google搜索
  • 谷歌文档
  • 360搜索
  • 新浪微博
  • Twitter
  • 搜狗搜索
  • 百度搜索
  • 百度视频
  • 百度学术
  • 掘金
  • QQ邮箱
  • Mozilla

我想支持更多的站点

点击这个链接,提交 issues,说出你想要支持的站点

贡献代码

需要通过 NodeJs 把 TypeScript 编译成 javascript

git clone https://github.com/axetroy/anti-redirect.git

cd ./anti-redirect

npm install
npm run watch

代码已经重构到简单令人发指了,欢迎各位大大 PR

贡献者


Axetroy

💻 🐛 🎨

开源许可

The MIT License (MIT)

Copyright (c) 2016 axetroy

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.