Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

打开爱奇艺视频,总会跳转到移动端的网页 #10

Open
evenfallscut opened this issue Apr 15, 2017 · 4 comments
Open

打开爱奇艺视频,总会跳转到移动端的网页 #10

evenfallscut opened this issue Apr 15, 2017 · 4 comments

Comments

@evenfallscut
Copy link

在电脑上打开爱奇艺,点击任何一个视频,都会跳转到m.iqiyi.com开头的移动端网页,把插件停用后就正常。

@ineer
Copy link
Owner

ineer commented Apr 15, 2017

原理就是要求跳转到移动版页面,然后加速视频广告。因为没有找到好的方法屏蔽爱奇艺广告。

@evenfallscut
Copy link
Author

简要说一下,我主要是看优酷、腾讯、爱奇艺,我另外在用的一款广告拦截软件是adsafe 5.0,可以屏蔽优酷、爱奇艺但无法屏蔽腾讯的广告(这奇葩的软件更新到5.3之后就变成了可以屏蔽腾讯但无法屏蔽爱奇艺),于是就打算用canClearAd来屏蔽腾讯。不过这样爱奇艺又会出问题。请问能不能把爱奇艺加入canClearAd的白名单之类的?如果可以我又要怎么设置呢。
谢谢~~

@ineer
Copy link
Owner

ineer commented Apr 15, 2017

先给你一个暂时的办法,打开background.js文件,删除或者注释掉以下代码
chrome.webRequest.onBeforeSendHeaders.addListener(function(request) {
for (var i = 0; i < request.requestHeaders.length; ++i) {
if (request.requestHeaders[i].name === 'User-Agent') {
request.requestHeaders[i].value = 'Mozilla/5.0 (Linux; Android 4.4.4; Nexus 5 Build/KTU84P) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/44.0.2403.130 Mobile Safari/537.36';
break;
}
}
return {requestHeaders: request.requestHeaders};
}, filter2, ['blocking', 'requestHeaders']);

更新扩展后可以让爱奇艺页面不再跳转到移动端。

canClearAd可能不会加入白名单机制,因为我希望他不需要用户进行任何设置。

@evenfallscut
Copy link
Author

删除后已解决爱奇艺问题,谢谢了~~

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants