# antiautoclick

> A small JS package for detecting autoclicking in the client

Latest version **1.0.6** (published 2022-10-13) · MIT license · 0 weekly downloads

## Install

```sh
npm install antiautoclick
pnpm add antiautoclick
yarn add antiautoclick
bun add antiautoclick
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.6 |
| Published | 2022-10-13 |
| First published | 2022-10-13 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 12.6 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 2 |
| Author | CatR3kd |
| Maintainers | catr3kd |
| Keywords | js, anticheat, autoclicker, antiautoclick |

## Links

- npm: https://www.npmjs.com/package/antiautoclick
- Repository: https://github.com/CatR3kd/antiautoclick
- Homepage: https://github.com/CatR3kd/antiautoclick#readme
- Issues: https://github.com/CatR3kd/antiautoclick/issues
- npm.io page: https://npm.io/package/antiautoclick

## Alternatives

- [@mapbox/jsonlint-lines-primitives](https://npm.io/package/@mapbox/jsonlint-lines-primitives.md) — 5.3M weekly downloads
- [reftools](https://npm.io/package/reftools.md) — 3.5M weekly downloads
- [@hey-api/openapi-ts](https://npm.io/package/@hey-api/openapi-ts.md) — 3.5M weekly downloads
- [@mapbox/geojson-rewind](https://npm.io/package/@mapbox/geojson-rewind.md) — 2.4M weekly downloads
- [turbo-stream](https://npm.io/package/turbo-stream.md) — 1.7M weekly downloads

## Recent versions

- 1.0.6 (latest) — 2022-10-13
- 1.0.5 — 2022-10-13
- 1.0.4 — 2022-10-13
- 1.0.3 — 2022-10-13
- 1.0.2 — 2022-10-13
- 1.0.1 — 2022-10-13
- 1.0.0 — 2022-10-13

## README

# antiautoclick
Small JS script for detecting autoclicking in the client.
Include 
```HTML
<script src="https://unpkg.com/antiautoclick@1.0.6/antiautoclick.js"></script>
```
in your HTML, JS usage is as follows:
```Javascript
const detector = new antiautoclick(punishment, options);
```

## Punishment

A function do run when detected, recommended is:
```Javascript
window.location.reload();
```

## Options:
```Javascript
const options = {
    clicksToSave: 40,
    detectNonhumanClick: true,
    detectClickInterval: {
      enabled: true,
      margin: 10
    },
    detectFastClicking: {
      enabled: true,
      maximumAvgPerSecond: 40
    }
  }
```

#### clicksToSave:
How many clicks the program keeps track of. Recommended 40, but you can increase it to improve accuracy at the cost of some RAM.

#### detectNonhumanClick:
Determines whether `element.click()` is detected. Recommended true.

#### detectClickInterval:
Detects repetitive and robotic clicking. (Ex. clicking exactly once every 10ms)
- enabled: Determines whether it is active. Recommended true.
- margin: Determines the maximum average difference between click timing to detect. Recommended 10ms.

#### detectFastClicking
Detects really fast clicking.
- enabled: Determines whether it is active. Recommended true
- maximumAvgPerSecong: Determines the maximum average clicks per second without detection. Recommended 40.

---
_Source: https://npm.io/package/antiautoclick · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
