Skip to content

Commit

Permalink
bug fix #93
Browse files Browse the repository at this point in the history
  • Loading branch information
jekuer committed Jul 20, 2022
1 parent 43e7f2a commit 7e10ce3
Show file tree
Hide file tree
Showing 12 changed files with 39 additions and 24 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

## Version 1

- v1.11 : 1-option support, static ics support, instagram browser support, multi-lang, hide background option, recurring events, and more
- v1.10 : auto-generating schema.org and dropping support for its input
- v1.9 : big code style update + linter setup
- v1.8 : new button style
Expand Down
2 changes: 1 addition & 1 deletion assets/css/atcb-3d.css
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
*
* Style: 3D
*
* Version: 1.11.2
* Version: 1.11.3
* Creator: Jens Kuerschner (https://jenskuerschner.de)
* Project: https://github.com/jekuer/add-to-calendar-button
* License: MIT with “Commons Clause” License Condition v1.0
Expand Down
3 changes: 1 addition & 2 deletions assets/css/atcb.css
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
*
* Style: Default
*
* Version: 1.11.2
* Version: 1.11.3
* Creator: Jens Kuerschner (https://jenskuerschner.de)
* Project: https://github.com/jekuer/add-to-calendar-button
* License: MIT with “Commons Clause” License Condition v1.0
Expand Down Expand Up @@ -134,7 +134,6 @@
-webkit-tap-highlight-color: transparent;
}

.atcb-list-item:hover,
.atcb-list-item:hover {
background-color: #fff;
box-shadow: 1px 2px 10px 0 rgb(0 0 0 / 40%);
Expand Down
2 changes: 1 addition & 1 deletion assets/css/atcb.min.css.map

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

13 changes: 9 additions & 4 deletions assets/js/atcb.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
* Add-to-Calendar Button
* ++++++++++++++++++++++
*/
const atcbVersion = '1.11.2';
const atcbVersion = '1.11.3';
/* Creator: Jens Kuerschner (https://jenskuerschner.de)
* Project: https://github.com/jekuer/add-to-calendar-button
* License: MIT with “Commons Clause” License Condition v1.0
Expand Down Expand Up @@ -715,8 +715,6 @@ function atcb_open(data, button, keyboardTrigger = false, generatedButton = fals
}
}
} else {
// if no button is defined, fallback to listStyle "modal"
data.listStyle = 'modal';
list.classList.add('atcb-modal');
}
// define background overlay
Expand Down Expand Up @@ -777,7 +775,14 @@ function atcb_action(data, triggerElement, keyboardTrigger = true) {
if (!atcb_validate(data)) {
throw new Error('Invalid data; see logs');
}
data.identifier = triggerElement.id;
if (triggerElement) {
data.identifier = triggerElement.id;
} else {
data.identifier = 'atcb-btn-custom';
// if no button is defined, fallback to listStyle "modal" and "click" trigger
data.listStyle = 'modal';
data.trigger = 'click';
}
atcb_open(data, triggerElement, keyboardTrigger);
}

Expand Down
2 changes: 1 addition & 1 deletion assets/js/atcb.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion assets/js/atcb.min.js.map

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -124,13 +124,13 @@
</style>

<!-- load the general button css -->
<link rel="stylesheet" href="./assets/css/atcb.min.css?v=1.11.2">
<link rel="stylesheet" href="./assets/css/atcb.min.css?v=1.11.3">

</head>
<body>
<div class="container">

<h1>Add-to-Calendar Button <span id="tinyVersion">v1.11.2</span></h1>
<h1>Add-to-Calendar Button <span id="tinyVersion">v1.11.3</span></h1>
<h2>A convenient JavaScript snippet, which lets you create beautiful buttons, where people can add events to their calendars.</h2>
<p class="github">
<a target="_blank" rel="noopener" href="https://github.com/jekuer/add-to-calendar-button" class="clean">
Expand Down Expand Up @@ -610,7 +610,7 @@ <h3>Example 8: Bring-Your-Own Anything</h3>


<!-- load the button js -->
<script src="./assets/js/atcb.min.js?v=1.11.2" async defer></script>
<script src="./assets/js/atcb.min.js?v=1.11.3" async defer></script>
<script type="application/javascript" src="https://buttons.github.io/buttons.js" async defer></script>

</body>
Expand Down
13 changes: 9 additions & 4 deletions npm_dist/cjs/index.js

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

13 changes: 9 additions & 4 deletions npm_dist/mjs/index.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": "add-to-calendar-button",
"version": "1.11.2",
"version": "1.11.3",
"engines": {
"node": ">=14.20.0"
},
Expand Down

0 comments on commit 7e10ce3

Please sign in to comment.