Skip to content

Commit

Permalink
AG-26254 Add json-prune-xhr-response scriptlet. #360
Browse files Browse the repository at this point in the history
Squashed commit of the following:

commit 73102eb
Merge: 328e90b d08439d
Author: Adam Wróblewski <adam@adguard.com>
Date:   Mon Mar 25 09:58:48 2024 +0100

    Merge branch 'master' into feature/AG-26254

commit 328e90b
Author: Adam Wróblewski <adam@adguard.com>
Date:   Thu Mar 21 11:45:57 2024 +0100

    Convert content only if it has been modified

commit 889ef7e
Author: Adam Wróblewski <adam@adguard.com>
Date:   Thu Mar 21 10:53:06 2024 +0100

    Convert to boolean

commit bd1261d
Author: Adam Wróblewski <adam@adguard.com>
Date:   Thu Mar 21 10:51:31 2024 +0100

    Remove unnecessary variable declaration

commit a34191b
Author: Adam Wróblewski <adam@adguard.com>
Date:   Thu Mar 21 10:45:23 2024 +0100

    Use switch statement

commit 4b5524e
Author: Adam Wróblewski <adam@adguard.com>
Date:   Thu Mar 21 10:18:05 2024 +0100

    Change to single line

commit 729279f
Author: Adam Wróblewski <adam@adguard.com>
Date:   Thu Mar 21 10:13:18 2024 +0100

    Move setRequestHeaderWrapper from openWrapper

commit 59d2729
Author: Adam Wróblewski <adam@adguard.com>
Date:   Wed Mar 20 09:56:40 2024 +0100

    Rename variable
    Refactor
    Fix converting to ArrayBuffer

commit ea7eb36
Author: Adam Wróblewski <adam@adguard.com>
Date:   Fri Mar 15 11:01:40 2024 +0100

    Add json-prune-xhr-response scriptlet
  • Loading branch information
AdamWr committed Mar 25, 2024
1 parent d08439d commit e6862db
Show file tree
Hide file tree
Showing 6 changed files with 837 additions and 0 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ The format is based on [Keep a Changelog], and this project adheres to [Semantic
### Added

- `json-prune-fetch-response` scriptlet [#361]
- `json-prune-xhr-response` scriptlet [#360]
- `href-sanitizer` scriptlet [#327]
- `no-protected-audience` scriptlet [#395]
- Domain value for setting cookie scriptlets [#389]
Expand Down Expand Up @@ -54,6 +55,7 @@ The format is based on [Keep a Changelog], and this project adheres to [Semantic
[#388]: https://github.com/AdguardTeam/Scriptlets/issues/388
[#377]: https://github.com/AdguardTeam/Scriptlets/issues/377
[#361]: https://github.com/AdguardTeam/Scriptlets/issues/361
[#360]: https://github.com/AdguardTeam/Scriptlets/issues/360
[#327]: https://github.com/AdguardTeam/Scriptlets/issues/327
[#300]: https://github.com/AdguardTeam/Scriptlets/issues/300

Expand Down
1 change: 1 addition & 0 deletions scripts/compatibility-table.json
Original file line number Diff line number Diff line change
Expand Up @@ -347,6 +347,7 @@
"ubo": "json-prune-fetch-response.js"
},
{
"adg": "json-prune-xhr-response",
"ubo": "json-prune-xhr-response.js"
},
{
Expand Down
4 changes: 4 additions & 0 deletions src/helpers/request-utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,10 @@ type SharedRequestData<T> = {
[key in LegalRequestProp]?: T;
};

export interface XMLHttpRequestSharedRequestData<T> extends SharedRequestData<T> {
async: boolean | string;
}

/**
* Object which is populated with request data from scriptlet arguments
*/
Expand Down
Loading

0 comments on commit e6862db

Please sign in to comment.