Last active
May 25, 2023 09:59
-
-
Save yang10560/036a2a3c6db19baeb7dbee82914b7798 to your computer and use it in GitHub Desktop.
PC上使用浏览器点开QQ链接,在提示非QQ官方链接页面自动打开对应的链接
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ==UserScript== | |
// @name QQ链接自动打开 | |
// @namespace http://yeyu1024.xyz | |
// @version 1.0 | |
// @description PC上使用浏览器点开QQ链接,在提示非QQ官方链接页面自动打开对应的链接 | |
// @author 夜雨 | |
// @match https://c.pc.qq.com/* | |
// @icon https://mat1.gtimg.com/www/icon/favicon2.ico | |
// @grant none | |
// @license MIT | |
// ==/UserScript== | |
(function() { | |
'use strict'; | |
let linkUrl = "" | |
if(location.href.includes('c.pc.qq.com')){ | |
linkUrl = document.querySelector("div#url").innerText; | |
linkUrl && (window.location.href = linkUrl) ; | |
} | |
})(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment