JSECOIN [THE FUTURE BLOCKCHAIN & ECOSYSTEM FOR ECOMMERCE AND DIGITAL ADVERTISING]
We are still working on the interface and know there are still a number of bugs and cross browser issues - please be patient.. in the meantime please use our original captcha UI code from here.
JSE Captcha is a free to use bot prevention tool. It can be used to protect content and endpoints from automated requests.
Official Release and Developer docs acan be found here: https://developer.jsecoin.com
Setting up the captcha requires two parts, a code snippet on the web page and then a server-side verification check.
Server-side Verification It is essential to check the captcha has been completed using server-side code to protect your endpoints. We do this using the clients IP address (IPV4) and the following URL:
https://api.jsecoin.com/captcha/check/:ipAddress/
Demo.
PS.. Check out our live Platform.
JSE Captcha has been built with Svelte.
Svelte is a radical new approach to building user interfaces. Whereas traditional frameworks like React and Vue do the bulk of their work in the browser, Svelte shifts that work into a compile step that happens when you build your app.
Instead of using techniques like virtual DOM diffing, Svelte writes code that surgically updates the DOM when the state of your app changes.
<script>
import JSEcaptcha from 'JSEcaptcha.svelte';
</script>
<JSEcaptcha theme="flat" size="M" on:success="{() => console.log('On success!')}" on:fail="{() => console.log('On fail!')}" />
IIFE build:
<script src='/jsecaptcha.iife.min.js'></script>
<div id="captcha"></div>
Add component:
var jseCaptcha = new Jsecaptcha({
target: document.getElementById('captcha'), //injection point
props: {
size: 'S', // ['','S','M','L']
theme: 'flat', //['','flat']
//captchaServer: 'https://load.jsecoin.com', //just for JSE devs
}
});
//success response
jseCaptcha.$on('success', (res) => {
console.log('Success: ', res.detail);
});
//failed reponse
jseCaptcha.$on('fail', (res) => {
console.log('Fail: ', res.detail);
});
- size controls the UI display
- 'S' - Small
- 'M' - Medium
- 'L' - Large
- theme available themes
- '' - dropshadow popup theme
- 'flat' - flat simple theme
- captchaServer only used by devs for testing tweaking server side algorithms.
- url of server (https://load.jsecoin.com)
- success - Emitted if user passes captcha bot detection tests.
- fail - Emitted if user fails captcha bot detection tests.
{"success":1,"rating":87,"pass":true,"knownIP":true, "ip":"148.252.129.187"}
{"success":1,"rating":0,"pass":false,"knownIP":false, "ip":"148.252.129.187"}
- Install Node.js v8.0.0 or higher.
- Clone this repository:
git clone https://github.com/JSEcoin/captcha
- Install dependencies
npm install
npm run dev
Open browser to http://localhost:5000
npm run build
Open /dist folder to locate build assets
This is an initial push alot of cleanup is still required if you spot an issue please report it and if we consider it a major issue we will credit your account as part of our bug bounty offering. Bug Bounty Info Page
If you'd like to assist and help the team please first review our Contribution Guidelines.
The component was originally created from the component project template by Yogev: https://github.com/YogliB/svelte-component-template And extended to support ie11 with this approach https://github.com/angelozehr/svelte-example-museums - https://blog.az.sg/posts/svelte-and-ie11/ by Angelo
This project is under the GNU General Public License v3.0.