阅读:2731回复:4
外链的超链接狗尾巴有没有通用的删除法? |
|
|
1楼#
发布于:2022-10-27 00:35
如果是那种点击时才加的,写个userjs把拦截一下点击事件就行
不过这个要准确定位到需要处理的<a>元素,所以不是通用的 |
|
2楼#
发布于:2022-10-27 06:40
|
|
|
3楼#
发布于:2022-10-28 19:07
viewtheard:点击时加的回到原帖至少你给的bbs7070.com这个论坛的帖子里的链接是一开始就是要跳转的。 不过这样处理起来还简单点,一行代码搞定 // ==UserScript== // @name bbs7070.com // @namespace bbs7070.com // @match https://bbs7070.com/* // @grant none // @version 1.0 // ==/UserScript== Array.prototype.forEach.call(document.querySelectorAll('a[href^="https://bbs7070.com/plugin.php?id=austgl_iframe:austgl_iframe&url="]'),(e)=>{e.href=e.innerText}); |
|
4楼#
发布于:2022-10-29 17:19
|
|
|