jekyll-theme-centos 2.52.0.beta.60 → 2.52.0.beta.62

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -11,8 +11,6 @@ class CopyButtonHandler {
11
11
  this.checkmarkViewbox = config.checkmarkViewbox || '0 0 448 512'
12
12
  this.successMessage = config.successMessage || 'Copied!'
13
13
  this.originalIcon = this._captureIcon()
14
-
15
- button.addEventListener('click', (e) => this.handleClick(e))
16
14
  }
17
15
 
18
16
  _captureIcon () {
@@ -126,12 +124,22 @@ document.addEventListener('DOMContentLoaded', function () {
126
124
  if (scriptElement.dataset.successMessage) config.successMessage = scriptElement.dataset.successMessage
127
125
  }
128
126
 
129
- document.querySelectorAll('.copy-btn').forEach(button => {
130
- try {
131
- new CopyButtonHandler(button, config)
132
- } catch (err) {
133
- console.error('Failed to initialize copy button:', button, 'Error:', err)
127
+ const handlers = new WeakMap()
128
+
129
+ document.addEventListener('click', function (e) {
130
+ const button = e.target.closest('.copy-btn')
131
+ if (!button) return
132
+
133
+ if (!handlers.has(button)) {
134
+ try {
135
+ handlers.set(button, new CopyButtonHandler(button, config))
136
+ } catch (err) {
137
+ console.error('Failed to initialize copy button:', button, 'Error:', err)
138
+ return
139
+ }
134
140
  }
141
+
142
+ handlers.get(button).handleClick(e)
135
143
  })
136
144
  })
137
145
  })()
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: jekyll-theme-centos
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.52.0.beta.60
4
+ version: 2.52.0.beta.62
5
5
  platform: ruby
6
6
  authors:
7
7
  - ReleaseBot
@@ -290,6 +290,7 @@ files:
290
290
  - _data/base/card_schema.yml
291
291
  - _data/base/color.yml
292
292
  - _data/base/color_schema.yml
293
+ - _data/base/configuration_variables_schema.yml
293
294
  - _data/base/content.yml
294
295
  - _data/base/content_schema.yml
295
296
  - _data/base/copyright.yml
@@ -333,8 +334,9 @@ files:
333
334
  - _includes/base/breakingnews.html.liquid
334
335
  - _includes/base/card.html.liquid
335
336
  - _includes/base/color-table.html.liquid
336
- - _includes/base/configuration-variables-nested.html.liquid
337
- - _includes/base/configuration-variables.html.liquid
337
+ - _includes/base/configuration_variables-nested.html.liquid
338
+ - _includes/base/configuration_variables.html.liquid
339
+ - _includes/base/content.html.liquid
338
340
  - _includes/base/copyright.html.liquid
339
341
  - _includes/base/copyvalue.html.liquid
340
342
  - _includes/base/datatable.html.liquid