zendriver-stealth 0.5.2

Anti-detection patches and profiles for zendriver
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
(function (seed) {
  const rng = __zdRng(seed);
  function noisy(v) { return v + (rng() - 0.5) * 1e-3; }
  __zdReplace(Element.prototype, 'getBoundingClientRect', (orig) => function () {
    const r = orig.call(this);
    return new DOMRect(noisy(r.x), noisy(r.y), noisy(r.width), noisy(r.height));
  });
  __zdReplace(Element.prototype, 'getClientRects', (orig) => function () {
    const list = orig.call(this);
    const out = [];
    for (let i = 0; i < list.length; i++) {
      const r = list[i];
      out.push(new DOMRect(noisy(r.x), noisy(r.y), noisy(r.width), noisy(r.height)));
    }
    return out;
  });
})(SEED);