
Security News
Attackers Are Hunting High-Impact Node.js Maintainers in a Coordinated Social Engineering Campaign
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.
A simple, lightweight JavaScript event plugin for detecting user input with caps lock on, with support for jQuery.
A simple, lightweight JavaScript event plugin for detecting user input with caps lock on, with support for jQuery.
jQuery is not required, but if you do use it, the plugin requires version >= 1.7
Tested on modern browsers and IE8.
bower install oncapslock
npm install oncapslock
Download dist/oncapslock.min.js and include it
// With jQuery usage is rather straightforward
$('#selector').on('capslock', function (e) {
alert('You are typing with Caps Lock on!');
});
// Without jQuery things get a bit complicated if you intend to support IE8
if (typeof document.addEventListener === 'function') {
// Modern browsers work as expected
document.getElementById('example').addEventListener('capslock', yourHandler);
} else {
// Older IEs don't support custom events, so we'll piggyback on another event
document.getElementById('example').attachEvent('onpropertychange',
function(e) {
// You'll have to check that it was actually fired because of caps
if (e.eventType === 'capslock') {
yourHandler(e);
}
}
);
}
document.getElementById('example').oncapslock = function(e) {
alert('You are typing with Caps Lock on!');
};
FAQs
A simple, lightweight JavaScript event plugin for detecting user input with caps lock on, with support for jQuery.
We found that oncapslock demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer 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.

Security News
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.

Security News
Axios compromise traced to social engineering, showing how attacks on maintainers can bypass controls and expose the broader software supply chain.

Security News
Node.js has paused its bug bounty program after funding ended, removing payouts for vulnerability reports but keeping its security process unchanged.