@bebranded/bb-contents 1.0.71-beta → 1.0.73-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 +13 -3
- 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.73-beta
|
|
5
5
|
* @author BeBranded
|
|
6
6
|
* @license MIT
|
|
7
7
|
* @website https://www.bebranded.xyz
|
|
@@ -22,19 +22,26 @@
|
|
|
22
22
|
|
|
23
23
|
// Vérifier si la version a déjà été affichée
|
|
24
24
|
if (window._bbContentsVersionDisplayed) {
|
|
25
|
+
console.log('🔄 [BB Contents] Version déjà affichée, réinitialisation...');
|
|
25
26
|
return;
|
|
26
27
|
}
|
|
27
28
|
window._bbContentsVersionDisplayed = true;
|
|
28
29
|
|
|
29
30
|
// Protection supplémentaire contre la double initialisation
|
|
30
31
|
if (window._bbContentsInitialized) {
|
|
32
|
+
console.log('🔄 [BB Contents] Déjà initialisé, réinitialisation...');
|
|
31
33
|
return;
|
|
32
34
|
}
|
|
33
35
|
window._bbContentsInitialized = true;
|
|
34
36
|
|
|
37
|
+
// Log de démarrage très visible
|
|
38
|
+
console.log('🚀 [BB Contents] DÉMARRAGE v1.0.72-beta - Safari Debug');
|
|
39
|
+
console.log('🔍 [BB Contents] User Agent:', navigator.userAgent);
|
|
40
|
+
console.log('🔍 [BB Contents] Safari détecté:', /^((?!chrome|android).)*safari/i.test(navigator.userAgent));
|
|
41
|
+
|
|
35
42
|
// Configuration
|
|
36
43
|
const config = {
|
|
37
|
-
version: '1.0.
|
|
44
|
+
version: '1.0.73-beta',
|
|
38
45
|
debug: true, // Debug activé pour diagnostic
|
|
39
46
|
prefix: 'bb-', // utilisé pour générer les sélecteurs (data-bb-*)
|
|
40
47
|
youtubeEndpoint: null, // URL du worker YouTube (à définir par l'utilisateur)
|
|
@@ -412,7 +419,7 @@
|
|
|
412
419
|
|
|
413
420
|
console.log(`🔍 [MARQUEE] Safari - Position initiale: ${currentPosition}px, transform: ${initialTransform}`);
|
|
414
421
|
|
|
415
|
-
// Fonction d'animation Safari avec
|
|
422
|
+
// Fonction d'animation Safari avec arrondi pour éviter les sauts
|
|
416
423
|
const animate = () => {
|
|
417
424
|
if (!isPaused) {
|
|
418
425
|
if (direction === (isVertical ? 'bottom' : 'right')) {
|
|
@@ -429,6 +436,9 @@
|
|
|
429
436
|
}
|
|
430
437
|
}
|
|
431
438
|
|
|
439
|
+
// ARRONDI pour éviter les erreurs de précision JavaScript
|
|
440
|
+
currentPosition = Math.round(currentPosition * 100) / 100;
|
|
441
|
+
|
|
432
442
|
// Transform optimisé pour Safari
|
|
433
443
|
const transform = isVertical
|
|
434
444
|
? `translate3d(0, ${currentPosition}px, 0)`
|