
Research
Security News
Lazarus Strikes npm Again with New Wave of Malicious Packages
The Socket Research Team has discovered six new malicious npm packages linked to North Korea’s Lazarus Group, designed to steal credentials and deploy backdoors.
enable-buttons
Advanced tools
Automatically enable/disable buttons based on required form inputs
Automatically enable/disable buttons based on required form inputs
npm install enable-buttons
<form class="js-enable-buttons">
<input type="text" name="hello" required>
<button type="submit" disabled>
Submit
</button>
</form>
import enableButtons from 'enable-buttons'
enableButtons()
The enableButtons
function can take an object, that
may include the following properties.
The class name that Enable Buttons uses to locate sections.
Defaults to js-enable-buttons
.
enableButtons({ className: 'my-special-class' })
If there is a button that you don't want Enable Buttons to
do it's magic on, then you can add the data-ignore
attribute to it.
<form class="js-enable-buttons">
<input type="text" name="hello" required>
<button type="submit" disabled>
Submit
</button>
<button type="button" data-ignore="true">
Don't touch me
</button>
</form>
Enable Buttons is packaged with Babel, and
makes use of Array.from
.
If you want Enable Buttons to work on browsers that don't support
this method (e.g. IE11), then you will need to
polyfill Array.from
before calling enableButtons
.
FAQs
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
The Socket Research Team has discovered six new malicious npm packages linked to North Korea’s Lazarus Group, designed to steal credentials and deploy backdoors.
Security News
Socket CEO Feross Aboukhadijeh discusses the open web, open source security, and how Socket tackles software supply chain attacks on The Pair Program podcast.
Security News
Opengrep continues building momentum with the alpha release of its Playground tool, demonstrating the project's rapid evolution just two months after its initial launch.