@bebranded/bb-contents 1.0.7-beta → 1.0.8-beta

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.
Files changed (2) hide show
  1. package/bb-contents.js +5 -6
  2. package/package.json +1 -1
package/bb-contents.js CHANGED
@@ -526,12 +526,11 @@
526
526
  },
527
527
 
528
528
  fillVideoData: function(element, videoId, snippet) {
529
- // Remplir le lien
530
- const link = element.querySelector('[bb-youtube-link]');
531
- if (link) {
532
- link.href = `https://www.youtube.com/watch?v=${videoId}`;
533
- link.target = '_blank';
534
- link.rel = 'noopener noreferrer';
529
+ // Remplir le lien directement sur l'élément (link block)
530
+ if (element.tagName === 'A' || element.hasAttribute('bb-youtube-item')) {
531
+ element.href = `https://www.youtube.com/watch?v=${videoId}`;
532
+ element.target = '_blank';
533
+ element.rel = 'noopener noreferrer';
535
534
  }
536
535
 
537
536
  // Remplir la thumbnail
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bebranded/bb-contents",
3
- "version": "1.0.7-beta",
3
+ "version": "1.0.8-beta",
4
4
  "description": "Contenus additionnels français pour Webflow",
5
5
  "main": "bb-contents.js",
6
6
  "scripts": {