Security News
The Unpaid Backbone of Open Source: Solo Maintainers Face Increasing Security Demands
Solo open source maintainers face burnout and security challenges, with 60% unpaid and 60% considering quitting.
vanilla-hcaptcha
Advanced tools
0 dependencies. It loads hcaptcha.min.js
if not already present on dom.
yarn add vanilla-hcaptcha
<script src="https://cdn.jsdelivr.net/npm/vanilla-hcaptcha/dist/hcaptcha-component.min.js"></script>
<h-captcha id="signupCaptcha"
site-key="10000000-ffff-ffff-ffff-000000000001"
size="normal"
dark
tabindex="0" />
const signupCaptcha = document.getElementById('signupCaptcha');
signupCaptcha.addEventListener('loaded', () => {
signupCaptcha.render(); // Show captcha
});
signupCaptcha.addEventListener('verified', (e) => {
console.log('verified event', { key: e.key });
});
signupCaptcha.addEventListener('expired', () => {
console.log('expired event');
});
signupCaptcha.addEventListener('error', (e) => {
console.log('error event', { error: e.error });
});
Attribute | Description |
---|---|
site-key | The site key generated in hCaptcha dashboard. |
size | One of: normal, compact, invisible |
dark | To use the dark theme |
tabindex | Set the tabindex of the hCaptcha popup. |
Event | Data | Description |
---|---|---|
loaded | null | Emitted when component is ready to show captcha. This is necessary if window.hcaptcha is not already in the dom. |
verified | key - verification key to be checked on backend side | Event emitted after captcha was successfully verified. |
expired | null | Emitted when a captcha was verified but it expired. |
error | error | Emitted when an error happened. |
yarn build
yarn test
FAQs
Vanilla Web Component for hCaptcha. 0 dependencies. <1kb gzipped.
The npm package vanilla-hcaptcha receives a total of 335 weekly downloads. As such, vanilla-hcaptcha popularity was classified as not popular.
We found that vanilla-hcaptcha demonstrated a healthy version release cadence and project activity because the last version was released less than 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
Solo open source maintainers face burnout and security challenges, with 60% unpaid and 60% considering quitting.
Security News
License exceptions modify the terms of open source licenses, impacting how software can be used, modified, and distributed. Developers should be aware of the legal implications of these exceptions.
Security News
A developer is accusing Tencent of violating the GPL by modifying a Python utility and changing its license to BSD, highlighting the importance of copyleft compliance.