您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
PC上使用浏览器点开微信链接,在提示非微信官方链接页面自动打开对应的链接
当前为
// ==UserScript== // @name PC微信链接自动打开 // @namespace http://tampermonkey.net/ // @version 0.1 // @description PC上使用浏览器点开微信链接,在提示非微信官方链接页面自动打开对应的链接 // @author huapeng222 // @match https://weixin110.qq.com/* // @icon https://www.google.com/s2/favicons?sz=64&domain=tampermonkey.net // @grant none // @license MIT // ==/UserScript== (function() { 'use strict'; const wechatTargets = document.getElementsByClassName("weui-msg__desc") let isWechatLink = false; let linkUrl = "" if (wechatTargets && wechatTargets.length > 0) { for (let i = 0; i< wechatTargets.length ;i++ ) { const e = wechatTargets[i]; if (e.className === "ui-ellpisis weui-msg__desc") { linkUrl = e.textContent; } if (e.textContent.indexOf("非微信官方网页") >= 0) { isWechatLink = true; break; } } } if (isWechatLink) { window.location.href = linkUrl; } })();