自动跳过QQ、微信地址拦截

自动跳过QQ、微信腾讯网址安全中心地址拦截

// ==UserScript==
// @name         自动跳过QQ、微信地址拦截
// @namespace    http://tampermonkey.net/
// @version      v1.0.1
// @description  自动跳过QQ、微信腾讯网址安全中心地址拦截
// @author       5cm/s
// @license      MIT
// @match        https://weixin110.qq.com/cgi-bin/mmspamsupport-bin/newredirectconfirmcgi**
// @match        https://c.pc.qq.com/middlem.html**
// @match        https://docs.qq.com/scenario/link.html**
// @icon         https://www.google.com/s2/favicons?sz=64&domain=qq.com
// ==/UserScript==

(function () {
  'use strict';
  
  let url
  if (document.location.host === 'weixin110.qq.com') {
    url = Array.from(document.querySelectorAll('p')).find(el => el.textContent?.match(/^https?:\/\//))?.textContent
  } else {
    const p = new URLSearchParams(location.search)
    url = p.entries().find(it => it[0].toLowerCase().includes('url'))?.[1]
  }
  if (url) window.location.replace(url)
})();