Skip to content

Commit 882067c

Browse files
Route tornpal requests through the background to bypass Torn's CSP policy on Firefox.
1 parent 863a025 commit 882067c

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

extension/changelog.json

+2-1
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,8 @@
1616
"message": "Opening a mini profile while on a profile no longer results in the FF Scouter being shown on the profile.",
1717
"contributor": "DeKleineKobini"
1818
},
19-
{ "message": "Improved performance while using FF Scouter in some cases.", "contributor": "DeKleineKobini" }
19+
{ "message": "Improved performance while using FF Scouter in some cases.", "contributor": "DeKleineKobini" },
20+
{ "message": "Route tornpal requests through the background to bypass Torn's CSP policy on Firefox.", "contributor": "DeKleineKobini" }
2021
],
2122
"changes": [{ "message": "Better optimize calls to tornpal.", "contributor": "DeKleineKobini" }],
2223
"removed": []

extension/scripts/features/ff-scouter/ff-scouter.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ function scoutFF(target) {
44
}
55

66
return new Promise((resolve, reject) => {
7-
fetchData("tornpal", { section: "ffscouter", includeKey: true, params: { target } })
7+
fetchData("tornpal", { section: "ffscouter", includeKey: true, relay: true, params: { target } })
88
.then((data) => {
99
ttCache.set({ [target]: data }, data.status ? TO_MILLIS.HOURS : TO_MILLIS.MINUTES * 5, "ff-scouter");
1010

@@ -21,7 +21,7 @@ function scoutFFGroup(targets) {
2121
}
2222

2323
return new Promise((resolve, reject) => {
24-
fetchData("tornpal", { section: "ffscoutergroup", includeKey: true, params: { targets } })
24+
fetchData("tornpal", { section: "ffscoutergroup", includeKey: true, relay: true, params: { targets } })
2525
.then((data) => {
2626
ttCache.set({ [cacheKey]: data }, data.status ? TO_MILLIS.HOURS : TO_MILLIS.MINUTES * 5, "ff-scouter-group");
2727

0 commit comments

Comments
 (0)