🏠 Home 

#### Wechat

自动重定向被微信拦截的链接

// ==UserScript==
// @name         #### Wechat
// @namespace    http://tampermonkey.net/
// @version      1.0
// @description  自动重定向被微信拦截的链接
// @author       [email protected]
// @match        https://weixin110.qq.com/*
// @icon         data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==
// @grant        none
// @license      MIT
// ==/UserScript==
(function() {
'use strict';
redirect()
function getUrl(){
const targetEl = document.querySelector(".weui-msg .weui-msg__text-area .ui-ellpisis-content p");
const targetText = targetEl?.innerText
const urlReg = /^(http:|https:)/img;
return urlReg.test(targetText) ? targetText : null;
}
function redirect() {
const url = getUrl()
if(url) { window.location.href = url }
}
})();