@bebranded/bb-contents 1.0.61-beta → 1.0.62-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 +12 -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.62-beta
|
|
5
5
|
* @author BeBranded
|
|
6
6
|
* @license MIT
|
|
7
7
|
* @website https://www.bebranded.xyz
|
|
@@ -25,10 +25,16 @@
|
|
|
25
25
|
return;
|
|
26
26
|
}
|
|
27
27
|
window._bbContentsVersionDisplayed = true;
|
|
28
|
+
|
|
29
|
+
// Protection supplémentaire contre la double initialisation
|
|
30
|
+
if (window._bbContentsInitialized) {
|
|
31
|
+
return;
|
|
32
|
+
}
|
|
33
|
+
window._bbContentsInitialized = true;
|
|
28
34
|
|
|
29
35
|
// Configuration
|
|
30
36
|
const config = {
|
|
31
|
-
version: '1.0.
|
|
37
|
+
version: '1.0.62-beta',
|
|
32
38
|
debug: false, // Debug désactivé
|
|
33
39
|
prefix: 'bb-', // utilisé pour générer les sélecteurs (data-bb-*)
|
|
34
40
|
youtubeEndpoint: null, // URL du worker YouTube (à définir par l'utilisateur)
|
|
@@ -489,10 +495,10 @@
|
|
|
489
495
|
});
|
|
490
496
|
};
|
|
491
497
|
|
|
492
|
-
// Démarrer l'initialisation avec délai adaptatif -
|
|
493
|
-
const baseDelay = isVertical ?
|
|
494
|
-
const
|
|
495
|
-
const initDelay = baseDelay +
|
|
498
|
+
// Démarrer l'initialisation avec délai adaptatif - Solution simple et efficace
|
|
499
|
+
const baseDelay = isVertical ? 800 : 400; // Délais fixes selon le type
|
|
500
|
+
const randomDelay = Math.random() * 100; // 0-100ms aléatoire pour éviter les conflits
|
|
501
|
+
const initDelay = baseDelay + randomDelay;
|
|
496
502
|
|
|
497
503
|
bbContents.utils.log(`Marquee ${index + 1} (${isVertical ? 'vertical' : 'horizontal'}) initialisé dans ${initDelay}ms`);
|
|
498
504
|
setTimeout(() => initAnimation(0), initDelay);
|