From f99a264399068c010c973db23de77a5dbe9826ab Mon Sep 17 00:00:00 2001 From: Shawn <45581750+KOP-XIAO@users.noreply.github.com> Date: Tue, 2 Jul 2019 11:37:05 +0800 Subject: [PATCH] Create YYeTs.js --- Scripts/YYeTs.js | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 Scripts/YYeTs.js diff --git a/Scripts/YYeTs.js b/Scripts/YYeTs.js new file mode 100644 index 0000000..c785d4e --- /dev/null +++ b/Scripts/YYeTs.js @@ -0,0 +1,31 @@ +let body = $response.body; +body = JSON.parse(body); +if (-1 != $request.url.indexOf('init')) { + body['adSwitch'] = []; + body['adUpdateTime'] += 86400*365; + // 关闭弹幕功能 + // body['barrageIp'] = ""; +} +if (-1 != $request.url.indexOf('ads')) { + // 留下影片推荐,防止轮播位置空白 + body['ads'] = body['ads'].filter( + function (item) { + if (6 != item.adType) { + return false; + } + if (-1 == item.click.indexOf('yyets://')) { + return false; + } + return true; + }); +} +body = JSON.stringify(body); +$done({body}); +/** + * 感谢分享 @haokaiyang + * MITM: ctrl.playcvn.com + * 人人影视字幕组(https://itunes.apple.com/cn/app/%E4%BA%BA%E4%BA%BA%E5%BD%B1%E8%A7%86%E5%AD%97%E5%B9%95%E7%BB%84/id1052761459) + * 应用有广告缓存,可能需要重装 + * Surge:http-response http://ctrl.playcvn.com/app/(init|ads) requires-body=true,script-path=YYeTs.js + * QuantumultX:^http://ctrl.playcvn.com/app/(init|ads) url script-response-body http:// + */