@bebranded/bb-contents 1.0.45-beta → 1.0.46-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.
- package/bb-contents.js +16 -6
- package/package.json +1 -1
package/bb-contents.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* BeBranded Contents
|
|
3
3
|
* Contenus additionnels français pour Webflow
|
|
4
|
-
* @version 1.0.
|
|
4
|
+
* @version 1.0.46-beta
|
|
5
5
|
* @author BeBranded
|
|
6
6
|
* @license MIT
|
|
7
7
|
* @website https://www.bebranded.xyz
|
|
@@ -9,6 +9,11 @@
|
|
|
9
9
|
(function() {
|
|
10
10
|
'use strict';
|
|
11
11
|
|
|
12
|
+
// Créer l'objet temporaire pour la configuration si il n'existe pas
|
|
13
|
+
if (!window._bbContentsConfig) {
|
|
14
|
+
window._bbContentsConfig = {};
|
|
15
|
+
}
|
|
16
|
+
|
|
12
17
|
// Protection contre le double chargement
|
|
13
18
|
if (window.bbContents) {
|
|
14
19
|
console.warn('BeBranded Contents est déjà chargé');
|
|
@@ -17,7 +22,7 @@
|
|
|
17
22
|
|
|
18
23
|
// Configuration
|
|
19
24
|
const config = {
|
|
20
|
-
version: '1.0.
|
|
25
|
+
version: '1.0.46-beta',
|
|
21
26
|
debug: true, // Activé temporairement pour debug
|
|
22
27
|
prefix: 'bb-', // utilisé pour générer les sélecteurs (data-bb-*)
|
|
23
28
|
youtubeEndpoint: null, // URL du worker YouTube (à définir par l'utilisateur)
|
|
@@ -30,6 +35,11 @@
|
|
|
30
35
|
if (window.bbContents && window.bbContents.config && window.bbContents.config.youtubeEndpoint) {
|
|
31
36
|
config.youtubeEndpoint = window.bbContents.config.youtubeEndpoint;
|
|
32
37
|
}
|
|
38
|
+
|
|
39
|
+
// Détecter la configuration dans l'objet temporaire
|
|
40
|
+
if (window._bbContentsConfig && window._bbContentsConfig.youtubeEndpoint) {
|
|
41
|
+
config.youtubeEndpoint = window._bbContentsConfig.youtubeEndpoint;
|
|
42
|
+
}
|
|
33
43
|
|
|
34
44
|
// Objet principal
|
|
35
45
|
const bbContents = {
|
|
@@ -169,10 +179,10 @@
|
|
|
169
179
|
return true;
|
|
170
180
|
}
|
|
171
181
|
|
|
172
|
-
// Vérifier dans
|
|
173
|
-
if (window.
|
|
174
|
-
this.config.youtubeEndpoint = window.
|
|
175
|
-
console.log('[DEBUG] YouTube endpoint found in
|
|
182
|
+
// Vérifier dans l'objet temporaire
|
|
183
|
+
if (window._bbContentsConfig && window._bbContentsConfig.youtubeEndpoint) {
|
|
184
|
+
this.config.youtubeEndpoint = window._bbContentsConfig.youtubeEndpoint;
|
|
185
|
+
console.log('[DEBUG] YouTube endpoint found in temp config:', this.config.youtubeEndpoint);
|
|
176
186
|
return true;
|
|
177
187
|
}
|
|
178
188
|
|