Fuck QQ URL

Skip Unsafe Link Warning in Desktop QQ Client

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴Greasemonkey 油猴子Violentmonkey 暴力猴,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴Violentmonkey 暴力猴,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴Userscripts ,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展后才能安装此脚本。

(我已经安装了用户脚本管理器,让我安装!)

您需要先安装一款用户样式管理器扩展,比如 Stylus,才能安装此样式。

您需要先安装一款用户样式管理器扩展,比如 Stylus,才能安装此样式。

您需要先安装一款用户样式管理器扩展,比如 Stylus,才能安装此样式。

您需要先安装一款用户样式管理器扩展后才能安装此样式。

您需要先安装一款用户样式管理器扩展后才能安装此样式。

您需要先安装一款用户样式管理器扩展后才能安装此样式。

(我已经安装了用户样式管理器,让我安装!)

// ==UserScript==
// @name        Fuck QQ URL
// @namespace   Hill98
// @description Skip Unsafe Link Warning in Desktop QQ Client
// @version     1.2.2
// @author      Hill-98
// @license     MIT
// @icon        https://qzonestyle.gtimg.cn/qzone/qzact/act/external/tiqq/logo.png
// @homepageURL https://github.com/Hill-98/userscripts
// @supportURL  https://github.com/Hill-98/userscripts/issues
// @grant       none
// @match       https://c.pc.qq.com/ios.html?*
// @match       https://c.pc.qq.com/middlem.html?*
// @match       https://c.pc.qq.com/pc.html?*
// ==/UserScript==

const usp = new URLSearchParams(location.search);
let url = usp.get('pfurl') || usp.get('url');
if (url !== null) {
  url = url.match(/^https?:\/\//) === null ? `http://${url}` : url;
  const meta = document.createElement('meta');
  meta.content = `0; url='${url}'`;
  meta.httpEquiv = 'refresh';
  document.head.innerHTML = meta.outerHTML;
  const tips = document.createElement('p');
  tips.style.fontSize = '2rem';
  tips.textContent = 'If there is no jump. ';
  const tipsLink = document.createElement('a');
  tipsLink.href = url;
  tipsLink.textContent = 'click here';
  tips.append(tipsLink);
  document.body.innerHTML = tips.outerHTML;
}