Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

add-to-calendar-button

Package Overview
Dependencies
Maintainers
1
Versions
153
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

add-to-calendar-button - npm Package Compare versions

Comparing version 1.7.2 to 1.7.3

test/server-side-rendering.js

18

npm_dist/cjs/index.js

@@ -6,3 +6,3 @@ /**

*/
const atcbVersion = '1.7.2';
const atcbVersion = '1.7.3';
/* Creator: Jens Kuerschner (https://jenskuerschner.de)

@@ -706,13 +706,15 @@ * Project: https://github.com/jekuer/add-to-calendar-button

const isBrowser=new Function("try {return this===window;}catch(e){ return false;}");
if (isBrowser()) {
// Global listener to ESC key to close dropdown
document.addEventListener('keydown', evt => {
if (evt.key === 'Escape') {
atcb_close();
}
});
}
// Global listener to ESC key to close dropdown
document.addEventListener('keydown', evt => {
if (evt.key === 'Escape') {
atcb_close();
}
});
module.exports = { atcb_action, atcb_init };

@@ -6,3 +6,3 @@ /**

*/
const atcbVersion = '1.7.2';
const atcbVersion = '1.7.3';
/* Creator: Jens Kuerschner (https://jenskuerschner.de)

@@ -706,13 +706,15 @@ * Project: https://github.com/jekuer/add-to-calendar-button

const isBrowser=new Function("try {return this===window;}catch(e){ return false;}");
if (isBrowser()) {
// Global listener to ESC key to close dropdown
document.addEventListener('keydown', evt => {
if (evt.key === 'Escape') {
atcb_close();
}
});
}
// Global listener to ESC key to close dropdown
document.addEventListener('keydown', evt => {
if (evt.key === 'Escape') {
atcb_close();
}
});
export { atcb_action, atcb_init };
{
"name": "add-to-calendar-button",
"version": "1.7.2",
"version": "1.7.3",
"description": "A convenient JavaScript snippet, which lets you create beautiful buttons, where people can add events to their calendars.",

@@ -8,2 +8,3 @@ "main": "npm_dist/cjs/index.js",

"exports": {
"./assets/css/": "./assets/css/",
".": {

@@ -15,3 +16,3 @@ "import": "./npm_dist/mjs/index.js",

"types": "index.d.ts",
"style": "assets/css/atcb.css",
"style": "assets/css/atcb.min.css",
"repository": {

@@ -52,3 +53,3 @@ "type": "git",

"scripts": {
"test": "echo \"Error: no test specified\" && exit 1",
"test": "node test/server-side-rendering.js",
"build": "grunt"

@@ -55,0 +56,0 @@ },

@@ -176,3 +176,5 @@ # 📅 Your next Add-to-Calendar Button!

### `atcb_action` example with React
### React examples
#### atcb_action

@@ -187,3 +189,3 @@ If you can't or don't want to use `atcb_init`, you can use the `atcb_action` import with your own buttons or other elements/components. If you omit the second argument, the dropdown list will display as a modal in the middle of the viewport - in this case, add the "atcb_customTrigger" class to the submitting element for better keyboard support.

const atcb_action = () => {
const MyComponent = () => {
const [name, setName] = React.useState('Some event')

@@ -209,2 +211,4 @@ return (

#### atcb_init
Alternatively, you could use `atcb_init` with a `useEffect` hook:

@@ -211,0 +215,0 @@

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc