Skip to content

Commit

Permalink
some fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
HichemTab-tech committed Sep 1, 2023
1 parent 9b94f25 commit df25994
Show file tree
Hide file tree
Showing 8 changed files with 29 additions and 9 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ You can install EasyCaptchaJS via npm:
You can also include EasyCaptchaJS directly from a CDN by adding the following script tag to your HTML file:

```HTML
<script src="https://cdn.jsdelivr.net/gh/HichemTab-tech/[email protected].0/dist/easycaptcha.min.js"></script>
<script src="https://cdn.jsdelivr.net/gh/HichemTab-tech/[email protected].1/dist/easycaptcha.min.js"></script>
```

### Local Download
Expand Down
2 changes: 1 addition & 1 deletion dist/easycaptcha.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*!
* EasyCaptchaJS v1.2.0
* EasyCaptchaJS v1.2.1
* (c) HichemTech
* Released under the MIT License.
* Github: https://github.com/HichemTab-tech/EasyCaptchaJS
Expand Down
2 changes: 1 addition & 1 deletion dist/easycaptcha.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "easycaptchajs",
"version": "1.2.0",
"version": "1.2.1",
"description": "EasyCaptchaJS is a lightweight and user-friendly jQuery/JS library that simplifies the integration of Google reCAPTCHA API into web pages. With EasyCaptchaJS, developers can effortlessly add the security and anti-bot protection of Google reCAPTCHA to their applications. The library dynamically imports the Google reCAPTCHA API script, handles event bindings and listeners, and initiates the reCAPTCHA checkbox within a specified parent container. Developers can take advantage of powerful options, including customizable success/failure listeners, verification checks, and a getter function to access the reCAPTCHA secret code for further processing. Streamline your web application's security with EasyCaptchaJS and ensure a smooth user experience.",
"main": "index.js",
"types": "types/easycaptchajs/index.d.ts",
Expand Down
2 changes: 1 addition & 1 deletion types/easycaptchajs/easycaptchajs-tests.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,4 @@ const instance2 = EasyCaptcha('verify', [], data, args);

// Calling EasyCaptcha function with 'getTarget' method
// $ExpectType EasyCaptchaResults
const instance3 = EasyCaptcha('getTarget', [], data, args);
const instance3 = EasyCaptcha('getTarget', [], data, args);
22 changes: 21 additions & 1 deletion types/easycaptchajs/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,27 @@ export interface EasyCaptchaSettings {

export type EasyCaptchaMethod = 'getTarget' | 'verify' | 'response' | 'reset' | 'destroy';

export type EasyCaptchaResults = any[] | any | null;
export type EasyCaptchaElementData = Record<string, any>;

export interface EasyCaptchaResultBaseTarget {
parentElement?: JQuery,
}

export interface EasyCaptchaResultTarget extends EasyCaptchaResultBaseTarget {
data: EasyCaptchaElementData
}

export interface EasyCaptchaResultVerify extends EasyCaptchaResultBaseTarget {
verified: boolean
}

export interface EasyCaptchaResultResponse extends EasyCaptchaResultBaseTarget {
token: string
}

export type EasyCaptchaResult = EasyCaptchaResultTarget | EasyCaptchaResultVerify | EasyCaptchaResultResponse;

export type EasyCaptchaResults = EasyCaptchaResult[] | EasyCaptchaResult | null;

export interface EasyCaptchaInstance {
(options?: EasyCaptchaSettings, ...args: string[]): EasyCaptchaResults;
Expand Down
2 changes: 1 addition & 1 deletion webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ const webpack = require("webpack");
// noinspection JSUnresolvedReference
let bannerPlugin = new webpack.BannerPlugin({
banner: `/*!
* EasyCaptchaJS v1.2.0
* EasyCaptchaJS v1.2.1
* (c) HichemTech
* Released under the MIT License.
* Github: https://github.com/HichemTab-tech/EasyCaptchaJS
Expand Down

0 comments on commit df25994

Please sign in to comment.