mirror of
https://github.com/fmz200/wool_scripts.git
synced 2025-12-20 13:43:58 +08:00
Initial commit: new history
This commit is contained in:
21
Scripts/51card.js
Normal file
21
Scripts/51card.js
Normal file
@ -0,0 +1,21 @@
|
||||
// 去除首页横幅广告,去除我的广告(只保留设置,个人资料)
|
||||
|
||||
if (!$response.body) {
|
||||
$done({});
|
||||
}
|
||||
const url = $request.url;
|
||||
let obj = JSON.parse($response.body);
|
||||
|
||||
if (obj?.operationResourceDTO) {
|
||||
obj.operationResourceDTO = [];
|
||||
}
|
||||
|
||||
if (url.includes("api.u51.com/generic-config-gateway/api")) {
|
||||
if (obj?.meTabConfigExts) {
|
||||
let reserve = ['设置']
|
||||
obj.meTabConfigExts = obj.meTabConfigExts.filter(item => reserve.includes(item.meTabConfigs[0].title));
|
||||
}
|
||||
}
|
||||
|
||||
body = JSON.stringify(obj);
|
||||
$done({body});
|
||||
Reference in New Issue
Block a user