Skip to content

Commit

Permalink
XHR details not being passed properly (#802)
Browse files Browse the repository at this point in the history
* Use a string to pass the XHR detail object to solve a Chromium thing.

* Fix High Low helper and other XHR related features

https://stackoverflow.com/a/53914790
https://issues.chromium.org/issues/40091619

---------

Co-authored-by: Sashank999 <[email protected]>
  • Loading branch information
DeKleineKobini and Sashank999 authored Aug 10, 2024
1 parent 1616144 commit 29e3ff3
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
3 changes: 2 additions & 1 deletion extension/changelog.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@
"fixes": [
{ "message": "Fix Disable Gym Stats when switching gyms.", "contributor": "TheFoxMan" },
{ "message": "Add Vanguard armor set to Auction House Filter.", "contributor": "TheFoxMan" },
{ "message": "Fix Employee Effectiveness Highlight after training an employee.", "contributor": "TheFoxMan" }
{ "message": "Fix Employee Effectiveness Highlight after training an employee.", "contributor": "TheFoxMan" },
{ "message": "Fix High Low helper and other XHR related features.", "contributor": "DeKleineKobini" }
],
"changes": [{ "message": "Total Portfolio Value is now live and accurate unless stocks transactions are made.", "contributor": "TheFoxMan" }],
"removed": []
Expand Down
6 changes: 5 additions & 1 deletion extension/scripts/global/inject/xhr.inject.js
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,11 @@ function interceptXHR(channel) {
json,
uri,
xhr: {
...this,
// We used to pass the current XHR here as "...this"
// but not possible due to some change in Chromium.
// https://stackoverflow.com/a/53914790
// https://issues.chromium.org/issues/40091619
requestBody: this.requestBody,
response: this.response,
responseURL: this.responseURL,
},
Expand Down

0 comments on commit 29e3ff3

Please sign in to comment.