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.1.6 to 1.2.0

12

npm_dist/atcb_npm.js

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

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

@@ -177,2 +177,4 @@ * Project: https://github.com/jekuer/add-to-calendar-button

}
// standardize any line breaks in the description
data['description'] = data['description'].replace(/<br\s*\/?>/gmi, '\n');
// generate the options list

@@ -263,3 +265,7 @@ let optionsList = document.createElement('div');

// show the placeholder div
button.style.display = 'block';
if (data['inline']) {
button.style.display = 'inline-block';
} else {
button.style.display = 'block';
}
// console log

@@ -404,3 +410,3 @@ console.log("add-to-calendar button #" + (buttonId + 1) + " created");

"DTEND" + timeslot + ":" + formattedDate['end'],
"DESCRIPTION:" + data['description'],
"DESCRIPTION:" + data['description'].replace(/\n/g, '\\n'),
"SUMMARY:" + data['title'],

@@ -407,0 +413,0 @@ "LOCATION:" + data['location'],

{
"name": "add-to-calendar-button",
"version": "1.1.6",
"version": "1.2.0",
"description": "A convenient JavaScript snippet, which lets you create beautiful buttons, where people can add events to their calendars.",

@@ -5,0 +5,0 @@ "main": "npm_dist/atcb_npm.js",

@@ -16,3 +16,3 @@ # Your next Add-to-Calendar Button

While building a personal wedding page, I was confronted with the task to include a button, where invited people could save the event to their calenders.
While building a personal wedding page, I was confronted with the task to include a button, where invited people could save the event to their calendars.
I did not want to build this from scratch (first) and therefore started the usual web research.

@@ -53,3 +53,3 @@ Unfortunately, all I found where some extremely outdated code snippets, which did not really fit all the modern systems and calendar tools.

### Option 1: Simple
### Option 1: simple

@@ -149,2 +149,4 @@ 1. Simply **download** the code from GitHub **or clone** the git repository.

* If you want to define a specific name for any generated ics file (iCal), you can specify it via the "iCalFileName" option. The default would be "event-to-save-in-my-calendar".
* You can use the option "inline":true in order to make the button appear with inline-block instead of block style.
* If you require line breaks within the description, use `\n` or `<br>`.

@@ -166,4 +168,5 @@

## Changelog (major only)
## Changelog (without bug fixes)
* v1.2.0 : inline and line break support
* v1.1.0 : npm functionality

@@ -170,0 +173,0 @@ * v1.0.0 : initial release

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