antiautoclick
v1.0.6
Published
A small JS package for detecting autoclicking in the client
Downloads
38
Maintainers
Readme
antiautoclick
Small JS script for detecting autoclicking in the client. Include
<script src="https://unpkg.com/[email protected]/antiautoclick.js"></script>
in your HTML, JS usage is as follows:
const detector = new antiautoclick(punishment, options);
Punishment
A function do run when detected, recommended is:
window.location.reload();
Options:
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.