Files
wool_scripts/Scripts/youdao/dict-youdao-ad.js
2025-06-30 21:59:46 +08:00

29 lines
1.2 KiB
JavaScript
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

/*************************************
项目名称:网易有道词典-首页净化学习Tab界面净化首页听读训练净化
使用声明:⚠️仅供参考,🈲转载与售卖!
**************************************
[rewrite_local]
^https:\/\/dict\.youdao\.com\/(homepage\/promotion|course\/tab\/home|homepage\/tile) url script-response-body https://raw.githubusercontent.com/fmz200/wool_scripts/main/Scripts/youdao/dict-youdao-ad.js
[mitm]
hostname = dict.youdao.com
************************************/
let obj = JSON.parse($response.body);
const url = $request.url;
if (url.includes('/homepage/promotion')) {
obj.data.dataList = obj.data.dataList.filter(i => i.type === 'WOW');
} else if (url.includes('/course/tab/home')) {
obj.data.tab.tabList = obj.data.tab.tabList.filter(i => i.title === '学库' || i.title === '四六级');
obj.data.icon.iconList = obj.data.icon.iconList.filter(i => i.title === '实用英语');
obj.data.fragmentList = obj.data.fragmentList.filter(i => i.type === 'GREAT_COURSE');
} else if (url.includes('/homepage/tile')) {
obj.data.children = obj.data.children.filter(i => i.type === '');
}
$done({body: JSON.stringify(obj)});