google-chrome - inject.preload.js 无法从我的开发环境中加载 chrome 中的文件
问题描述
我使用谷歌浏览器进行我的 php/js 开发。
今天我开始看到一个无法加载的文件。
文件名总是不同
Request URL: blob:http://random.homestead.test/4d9f984b-b8f8-4e77-97cb-4fcfd8ace348
网页说发起者是inject.preload.js:373
如果我打开这个文件,第一行说
/*
*This file is part of Adblock Plus <https://adblockplus.org/>,
但是我禁用了 Adblock Plus。我注意到文件偶尔会成功加载。并且还注意到只有在我激活 AdBlock(不是 AdblockPlus)时才请求此文件。如果我禁用了 AdBlock - 没问题。但即使我从 adblock 中排除我的开发站点 - 文件下载仍然失败。
我的问题是:如何在不完全停用 adblock 的情况下摆脱控制台日志和网络中的这条红线?
我在 stackoverflow.com 上尝试过,我看到相同的文件inject.preload.js
加载相同的随机命名文件并成功。文件头说:
/*
* Frame context wrapper
*
* For some edge-cases Chrome will not run content scripts inside of frames.
* Website have started to abuse this fact to access unwrapped APIs via a
* frame's contentWindow (#4586, 5207). Therefore until Chrome runs content
* scripts consistently for all frames we must take care to (re)inject our
* wrappers when the contentWindow is accessed.
*/
它于 2018 年 6 月 14 日从今天开始
解决方案
貌似正式破解了。该问题在https://issues.adblockplus.org/ticket/6744出票
我试图调试并找到确切的原因,但问题似乎出在其他地方。调试的 JS 代码(inject.preload.js 在第 373 行)
document.documentElement.appendChild(script); // here, script.src is indeed a valid script
document.documentElement.removeChild(script);
URL.revokeObjectURL(url);
的script
src 属性指向一个有效的 blob JS,当调用此行时它是活动的!
推荐阅读
- svn - 无法搁置 - TortoiseSVN 1.12
- flutter - Flutter/Dart:无法调用小部件方法
- swift - 一旦发生某些事情,我如何退出功能?
- python - 在 Cloud Function 中使用 Cloud SQL (Postgres)
- google-chrome-extension - LevelDB 访问问题
- bixby - 需要强制 Bixby 解释——在语音中作为停顿而不是减号
- python - 在 Python 中删除停用词而不进行标记
- python - Python 解释器在异步操作中将控制权交还给 C 调用者
- haskell - 阴谋集团安装工作,但阴谋集团列表没有找到包
- laravel - Laravel BelongsTo 通过关系