Commit 3e39527
committed
fix: use feature detection so browser compatability isn't reduced
notes:
======
* only Chrome 72+ recognize the "extraHeaders" option value
- both Firefox and older versions of Chrome
will throw an error if this value is included
when adding a listener to a "chrome.webRequest" event
annoyances:
===========
* the typescript definitions got in the way
* "@types/chrome" doesn't define types for any of the
"On---Options" classes in "chrome.webRequest"
* for this reason, any time they need to be accessed..
"chrome.webRequest" needs to be cast to "any"
* a future version of "@types/chrome" will hopefully
allow this casting to be removed
observations regarding status of browser compatability:
=======================================================
* tested in Chrome 85
- Cloudflare
* working:
- issuing of tokens
- redeeming of tokens
- hCaptcha
* working:
- issuing of tokens
- redeeming of tokens
* tested in Chrome 30
- Cloudflare
* not working:
- issuing of tokens
- hCaptcha
* working:
- issuing of tokens
- redeeming of tokens
* note: uses 2x tokens per bypassed captcha
* tested in Firefox 97
- Cloudflare
* working:
- issuing of tokens
- redeeming of tokens
- hCaptcha
* not working:
- issuing of tokens
to do:
======
* investigate why hCaptcha isn't issuing tokens in Firefox
- it's behaving as though the original request had been cancelled
- the request to issue tokens is being correctly sent to the provider,
but it's being returned with a 403 status code:
{"success":false,"error-codes":["invalid-data"]}1 parent 71e4b54 commit 3e39527
3 files changed
+38
-26
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | | - | |
| 3 | + | |
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | 3 | | |
4 | | - | |
| 4 | + | |
5 | 5 | | |
6 | 6 | | |
7 | 7 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
72 | 72 | | |
73 | 73 | | |
74 | 74 | | |
75 | | - | |
76 | | - | |
77 | | - | |
78 | | - | |
79 | | - | |
80 | | - | |
81 | | - | |
82 | | - | |
83 | | - | |
84 | | - | |
85 | | - | |
86 | | - | |
87 | | - | |
88 | | - | |
89 | | - | |
90 | | - | |
91 | | - | |
92 | | - | |
93 | | - | |
94 | | - | |
95 | | - | |
96 | | - | |
97 | | - | |
98 | | - | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
99 | 111 | | |
100 | 112 | | |
101 | 113 | | |
| |||
0 commit comments