Research
Security News
Malicious npm Packages Inject SSH Backdoors via Typosquatted Libraries
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
way2web-click-limit
Advanced tools
With this package you can set a limit on how many times you can click on the element.
Installation
npm install way2web-click-limit
Basic Usage
var element = $('.js-limited-click:first');
var test = new ClickLimit(element).init();
You can set a data attribute click-max to the element, to set the click limit.
The default value is 1
, so you can click the element only one time.
This function will called when you click on the element.
A variable clicked
will be increased by 1
.
The property disabled
will be set on the element.
You can call this function to reset the clicks on the element, so you can click again on the element.
The variable clicked
will be set to 0
.
The property disabled
will be removed from the element.
This function returns how many times you have clicked on the element.
This function returns how many times you can click on the element.
npm run lint
This will only lint your scripts.
npm test
This will run all the tests in the test folder with mocha.
FAQs
Disable the element on a click limit.
We found that way2web-click-limit demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 2 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Research
Security News
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
Security News
MITRE's 2024 CWE Top 25 highlights critical software vulnerabilities like XSS, SQL Injection, and CSRF, reflecting shifts due to a refined ranking methodology.
Security News
In this segment of the Risky Business podcast, Feross Aboukhadijeh and Patrick Gray discuss the challenges of tracking malware discovered in open source softare.