Skip to content

Commit 7a2cc23

Browse files
Small fix
1 parent b413f04 commit 7a2cc23

File tree

17 files changed

+258
-299
lines changed

17 files changed

+258
-299
lines changed

CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,11 @@
11
# Changelog
22

3+
## [1.3.2] - 2024-05-05
4+
5+
### Changed
6+
- Fixed an error that occurred in embedded mode where the plugin did not correctly scope the copy buttons to the active deck.
7+
8+
39
## [1.3.1] - 2024-05-04
410

511
### Changed

demo/demo-custom.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -253,7 +253,7 @@ <h3>Using the global options</h3>
253253
copyborder: "2px solid gray",
254254
copiedborder: "2px solid green",
255255
copiedcolor: "green",
256-
offset: 0.5,
256+
offset: 0.4,
257257
radius: 0.2
258258
}
259259
}

demo/demo-embed.html

Lines changed: 14 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -49,13 +49,7 @@ <h1>CopyCode two</h1>
4949
embedded: true, keyboardCondition: 'focused',
5050
margin: 0.1, maxScale: 1.8, width: 1080, height: 700,
5151
overview: false, center: true, controlsTutorial: false,
52-
plugins: [ CopyCode, RevealHighlight ],
53-
copycode: {
54-
appearparents: true,
55-
appearevent: 'auto',
56-
autoappear: true,
57-
autoelements: {'ul li': 'animate__fadeInLeft', 'h2': {"animation":"animate__shrinkIn", "speed":"slow", "delay":"800"}}
58-
}
52+
plugins: [ CopyCode, RevealHighlight ]
5953
});
6054

6155
const deck2 = new Reveal(document.querySelector("#deck2"), {
@@ -64,10 +58,19 @@ <h1>CopyCode two</h1>
6458
overview: false, center: true, controlsTutorial: false,
6559
plugins: [ CopyCode, RevealHighlight ],
6660
copycode: {
67-
appearparents: true,
68-
appearevent: 'slidechanged',
69-
autoappear: true,
70-
autoelements: {'ul li': 'animate__fadeInRight', 'h2': {"animation":"animate__fadeInUp", "speed":"slow", "delay":"800"}}
61+
debug: true,
62+
timeout: 1200,
63+
button: "always",
64+
display: "icons",
65+
style: {
66+
copybg: "rgba(255,255,255,128)",
67+
copiedbg: "white",
68+
copyborder: "2px solid gray",
69+
copiedborder: "2px solid green",
70+
copiedcolor: "green",
71+
offset: 0.4,
72+
radius: 0.2
73+
}
7174
}
7275
});
7376
deck1.initialize();

demo/plugin/copycode/copycode.css

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

demo/plugin/copycode/copycode.js

Lines changed: 6 additions & 14 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

demo/plugin/copycode/copycode.mjs

Lines changed: 96 additions & 107 deletions
Large diffs are not rendered by default.

package-lock.json

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "reveal.js-copycode",
3-
"version": "1.3.1",
3+
"version": "1.3.2",
44
"description": "A simple plugin for Reveal.js that automatically shows a copy button in code blocks",
55
"keywords": [
66
"reveal",

plugin/copycode/copycode.css

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

plugin/copycode/copycode.js

Lines changed: 6 additions & 14 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)