@bebranded/bb-contents 1.0.71-beta → 1.0.72-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 +20 -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.72-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.72-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,23 +419,33 @@
|
|
|
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 logs de debug
|
|
423
|
+
let frameCount = 0;
|
|
416
424
|
const animate = () => {
|
|
417
425
|
if (!isPaused) {
|
|
426
|
+
frameCount++;
|
|
427
|
+
|
|
418
428
|
if (direction === (isVertical ? 'bottom' : 'right')) {
|
|
419
429
|
currentPosition += step;
|
|
420
430
|
// Reset standard pour direction bottom/right - 3 copies
|
|
421
431
|
if (currentPosition >= 0) {
|
|
432
|
+
console.log(`🔄 [MARQUEE] Safari RESET bottom/right: ${currentPosition} → ${-(contentSize + gapSize)}`);
|
|
422
433
|
currentPosition = -(contentSize + gapSize);
|
|
423
434
|
}
|
|
424
435
|
} else {
|
|
425
436
|
currentPosition -= step;
|
|
426
437
|
// Reset standard pour direction top/left - 3 copies
|
|
427
438
|
if (currentPosition <= -(2 * (contentSize + gapSize))) {
|
|
439
|
+
console.log(`🔄 [MARQUEE] Safari RESET top/left: ${currentPosition} → ${-(contentSize + gapSize)}`);
|
|
428
440
|
currentPosition = -(contentSize + gapSize);
|
|
429
441
|
}
|
|
430
442
|
}
|
|
431
443
|
|
|
444
|
+
// Log de position toutes les 60 frames (1 seconde)
|
|
445
|
+
if (frameCount % 60 === 0) {
|
|
446
|
+
console.log(`📍 [MARQUEE] Safari position: ${currentPosition}px (frame ${frameCount})`);
|
|
447
|
+
}
|
|
448
|
+
|
|
432
449
|
// Transform optimisé pour Safari
|
|
433
450
|
const transform = isVertical
|
|
434
451
|
? `translate3d(0, ${currentPosition}px, 0)`
|