腾讯限制连接自动跳转

腾讯QQ\TIM打开链接会跳转到https://c.pc.qq.com/middlem.html,这个插件可以帮助你自动跳转到目标网址

您需要先安裝使用者腳本管理器擴展,如 TampermonkeyGreasemonkeyViolentmonkey 之後才能安裝該腳本。

您需要先安裝使用者腳本管理器擴充功能,如 TampermonkeyViolentmonkey 後才能安裝該腳本。

您需要先安裝使用者腳本管理器擴充功能,如 TampermonkeyViolentmonkey 後才能安裝該腳本。

您需要先安裝使用者腳本管理器擴充功能,如 TampermonkeyUserscripts 後才能安裝該腳本。

你需要先安裝一款使用者腳本管理器擴展,比如 Tampermonkey,才能安裝此腳本

您需要先安裝使用者腳本管理器擴充功能後才能安裝該腳本。

(我已經安裝了使用者腳本管理器,讓我安裝!)

你需要先安裝一款使用者樣式管理器擴展,比如 Stylus,才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展,比如 Stylus,才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展,比如 Stylus,才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展後才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展後才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展後才能安裝此樣式

(我已經安裝了使用者樣式管理器,讓我安裝!)

// ==UserScript==
// @name         腾讯限制连接自动跳转
// @namespace    https://github.com/navee/fuckqq
// @version      0.1.3
// @description  腾讯QQ\TIM打开链接会跳转到https://c.pc.qq.com/middlem.html,这个插件可以帮助你自动跳转到目标网址
// @author       Navee
// @match        http*://c.pc.qq.com/middlem.html?*
// @match        http*://c.pc.qq.com/index.html?*
// @icon         https://www.google.com/s2/favicons?domain=qq.com
// @grant        none
// ==/UserScript==

(function() {
    'use strict';

    // 就这么简单
    try{
        window.location.href=getParams("pfurl");
    }catch(err){
        console.error(err);
        window.location.href=decodeURIComponent(/pfurl\=(.*?)&+/.exec(window.location.href)[1])
    }
})();