Skip to content

Commit

Permalink
partially fix issues with privacy.firstparty.isolate=true
Browse files Browse the repository at this point in the history
  • Loading branch information
benoit-pierre committed Nov 6, 2024
1 parent 6f7b6e3 commit 6daa49b
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ A Firefox [userscript](https://en.wikipedia.org/wiki/Userscript): combine with [

Supported userscript managers:

- [FireMonkey](https://addons.mozilla.org/en-US/firefox/addon/firemonkey) (as of `2.72`): partially broken when using `privacy.firstparty.isolate=true` and containers.
- [FireMonkey](https://addons.mozilla.org/en-US/firefox/addon/firemonkey) (as of `2.72`): yes.

- [GreaseMonkey](https://addons.mozilla.org/en-US/firefox/addon/greasemonkey) (as of `4.13`): broken when using `privacy.firstparty.isolate=true`.

Expand Down
2 changes: 2 additions & 0 deletions main.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -57,13 +57,15 @@ export async function main(GM, unsafeWindow) {
typeof GM.fetch === "function"
// FireMonkey.
? href => GM.fetch(href, {
anonymous: true,
method: 'GET',
cache: 'force-cache',
responseType: 'arrayBuffer',
}).then(r => copy_array(r.arrayBuffer))
// Other script managers.
: href => new Promise((resolve, reject) => {
GM.xmlHttpRequest({
anonymous: true,
url: href,
method: 'GET',
responseType: 'arraybuffer',
Expand Down

0 comments on commit 6daa49b

Please sign in to comment.