点击 喜欢此内容的人还喜欢
中文章,在新标签页打开链接,而非现标签页
点击安装 👉 🔗 在新标签打开微信公众号文章链接
点击 喜欢此内容的人还喜欢
中文章,在新标签页打开链接,而非现标签页
点击安装 👉 🔗 在新标签打开微信公众号文章链接
// ==UserScript== | |
// @name 在新标签打开微信公众号文章链接 | |
// @description 在新标签打开微信公众号文章链接 | |
// @author forestlet | |
// @copyright 2022- | |
// @homepageURL https://gist.github.com/forestlet/eb6ece5a3d0079619a8a06776a7962a8/ | |
// @version 0.2 | |
// @lastmodified 2022-02-25 | |
// @match https://mp.weixin.qq.com/* | |
// @namespace http://tampermonkey.net/ | |
// @grant none | |
// @icon data:image/svg+xml,<svg xmlns=%22http://www.w3.org/2000/svg%22 viewBox=%220 0 100 100%22><text y=%22.9em%22 font-size=%2280%22>🔗</text></svg> | |
// ==/UserScript== | |
(function () { | |
'use strict'; | |
// Your code here... | |
window.onload = function () { | |
let list_items = document.getElementsByClassName("weui-media-box weui-media-box_appmsg js_related_item js_wx_tap_highlight wx_tap_cell") | |
for (let i = 0; i < list_items.length; i++) { | |
let item = list_items[i] | |
item.onclick = (e) => { | |
e.preventDefault() | |
e.stopPropagation() | |
let link = item.getAttribute("data-url") | |
window.open(link, "_blank") | |
} | |
} | |
} | |
})(); |