绕过 QQ 已停止访问

自动跳过QQ中间页面直接访问原始链接

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

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

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

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

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

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

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

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

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

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

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

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

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

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

// ==UserScript==
// @name         绕过 QQ 已停止访问
// @namespace    cpcqqcombypass
// @version      1.0
// @description  自动跳过QQ中间页面直接访问原始链接
// @author       Luke Zhang
// @license      GPL-3.0-or-later
// @homepage     https://github.com/win-lukezhang/cpcqqcombypass
// @match        *://c.pc.qq.com/*
// @match        *://c.pc.qq.com/ios.html*
// @match        *://c.pc.qq.com/android.html*
// @match        *://c.pc.qq.com/pc.html*
// @icon         https://www.qq.com/favicon.ico
// @grant        none
// ==/UserScript==

(function() {
    'use strict';

    // 获取URL参数函数
    function getQueryParam(name) {
        const params = new URLSearchParams(window.location.search);
        return params.get(name);
    }

    // 主处理函数
    function processRedirect() {
        const targetUrl = getQueryParam('url');

        if (targetUrl) {
            // 解码可能被编码的URL
            const decodedUrl = decodeURIComponent(targetUrl);
            // 立即跳转(使用replace避免历史记录)
            window.location.replace(decodedUrl);
        }
    }

    // 执行处理
    processRedirect();
})();