如何在网页打开闲鱼

23.05.21更新

貌似又恢复了H5版本

CleanShot 2023-05-21 at 14.00.22

缘由

在一些论坛上有坛友发闲置,附带了闲鱼链接,比如https://m.tb.cn/h.UD4fCbA?tk=z5mpdoRwENp,但是要求一定要APP打开,所以寻找一个解决办法

解决办法

谷歌商店安装Tampermonkey(俗称“油猴”)

在油猴里添加以下这个脚本(这个较于原版对链接识别做了修改,适应性更强)

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
// ==UserScript==
// @name 闲鱼强制PC版页面
// @namespace https://github.com/lihaoyun6/xianyu2pc
// @version 0.3.2
// @description 访问到移动版闲鱼页面时自动转到对应的PC版页面
// @author lihaoyun6
// @license MIT
// @match *://h5.m.goofish.com/*
// @run-at document-start
// @grant none
// @icon https://img.alicdn.com/tps/i3/TB1eW1eGXXXXXXAXFXXBS8UGFXX-41-22.png
// ==/UserScript==
let xianyuMobileObj = {
init () {
let curr_href = location.href;
let cat_arr = /id=(\d+)/.exec(curr_href);
if (cat_arr == null) {
console.log('log: detail info id not found.');
return;
}
let id = cat_arr[1];
location.href = 'https://item.taobao.com/item.htm?id=' + id; // done !
}
};

xianyuMobileObj.init();

此时重新进入闲鱼页面即可,测试如下

image-20230521135838068

更多浏览器相关技巧可以去我的github项目看看,enjoy it~

https://github.com/xiang0731/awesome-BrowserRelated/tree/main


脚本来自BigPear,部分有删减。