-
Notifications
You must be signed in to change notification settings - Fork 41
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
刷新之后拦截失败 #11
Comments
是的,插件原理是去重写XMLHttpRequest方法来做的拦截和修改 |
有时候打开页面没有拦截,开关控制台后才能拦截是为什么? 这个插件是在什么时候重写XMLHttpRequest的? |
是新打开的页面吗,插件是在页面加载就开始重写的。 |
好像是刷新后的页面,偶尔不能拦截,可能插件脚本加载晚了 |
是的,是有可能的。 |
老哥能不能试试在创建inject元素的时候加个 .async = false;, 或许能阻止其他脚本异步执行(不过我不熟悉js) |
应该是不行的,你可以clone代码试下,postmessage确实也是异步的。 |
页面刷新之后拦截失败,需要再点击页面按钮发送请求才拦截成功。我猜是刷新之后先加载了页面元素,然后才进行拦截。
The text was updated successfully, but these errors were encountered: