Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
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"]}
- Loading branch information