feat: Overriding WebWorker Navigator#506
Conversation
|
HI, |
|
Exactly, they run isolated. However we're able to intercept every |
barjin
left a comment
There was a problem hiding this comment.
Hello and thank you for your contribution!
I have some discussion points regarding the proposed changes:
| URL.createObjectURL = function (blob) { | ||
| if (blob.type === 'application/javascript') { | ||
| // eslint-disable-next-line | ||
| blob = new Blob([worker, blob], { type: blob.type }); | ||
| } | ||
| return createObjectURL.call(this, blob); | ||
| }; |
There was a problem hiding this comment.
Note that this will only work with Web Workers initialized with new Worker(URL.createObjectURL(new Blob(...))), which is quite specific and doesn't cover all the possible use cases (e.g. const myWorker = new Worker("worker.js");).
Also, this approach will edit URL.createObjectURL return value for all application/javascript blobs, not only the Web Worker-related ones.
Hi there!
I recently found this website which flagged my project with inconsistent Web Works values.
I believe the solution would be great against Anti Bot services.
Before patch:

After patch:

Close: #64