mirror of
https://github.com/fmz200/wool_scripts.git
synced 2025-12-19 13:41:18 +08:00
21 lines
536 B
JavaScript
21 lines
536 B
JavaScript
// 去除首页横幅广告,去除我的广告(只保留设置,个人资料)
|
|
|
|
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}); |