fix: anti-detection

This commit is contained in:
Xmader 2020-11-07 16:58:08 -05:00
parent 322af44d7a
commit 506b485e82
No known key found for this signature in database
GPG Key ID: A20B97FB9EB730E4
1 changed files with 6 additions and 0 deletions

View File

@ -56,6 +56,12 @@ export const hideFromArrFilter = (() => {
const nodes = _fn.apply(this, args)
const results = Array.prototype.filter.call(nodes, (e) => !l.has(e))
results.forEach((e) => {
Object.defineProperty(e, 'querySelectorAll', {
value: qsaHook,
})
})
// convert back to a NodeList/HTMLCollection instead of an Array
Object.setPrototypeOf(results, Object.getPrototypeOf(nodes))