Skip to content

Commit

Permalink
feat: 绑定原生ajax属性
Browse files Browse the repository at this point in the history
  • Loading branch information
liufei committed Mar 7, 2024
1 parent 857ef98 commit 91afaba
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions pageScripts/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -339,6 +339,9 @@ window.addEventListener("message", function (event) {
ajax_tools_space[data.key] = data.value;
}
if (ajax_tools_space.ajaxToolsSwitchOn) {
for (const k in ajax_tools_space.originalXHR) {
ajax_tools_space.myXHR[k] = ajax_tools_space.originalXHR[k]
}
window.XMLHttpRequest = ajax_tools_space.myXHR;
window.fetch = ajax_tools_space.myFetch;
} else {
Expand Down

0 comments on commit 91afaba

Please sign in to comment.