PageSourceSearch

https://ruuush.ch/wp-content/themes/listivo-child/_JS/connexion-inscription.js?ver=1749235814

js ruuush.ch collected 2026-10-02 00:27:39 UTC 4,976 bytes, 157 lines download raw bytes

1
2setTimeout(function() {
3    if (typeof NativelyInfo !== 'undefined') {
4        try {
5            const info = new NativelyInfo();
6            // Appel direct à browserInfo() sans promesse
7            const browserInfo = info.browserInfo(); 
8            // Si l'utilisateur est dans l'application native (iOS ou Android)
9            if (browserInfo.isNativeApp) {
10                    // Masquer le menu avec la classe 'menu-app'
11                    var menuApp = document.querySelector('.menu-app');
12                    if (menuApp) {
13                        menuApp.style.display = 'none';
14                }
15            }
16        } catch (infoError) {
17        }    
18        
19    } else {
20    }
21}, 0);  // Attendre 500ms avant d'exécuter le script
22
23
24//Forcer la bascule sur la partie "connexion"
25document.addEventListener("DOMContentLoaded", function () {
26
27
28    const urlParams = new URLSearchParams(window.location.search);
29    const onglet = urlParams.get("onglet");
30
31
32
33    if (onglet === "connexion") {
34        const tryActivateConnexion = setInterval(() => {
35            const tabConnexion = document.getElementById("e-n-tab-title-910744942");
36            const tabInscription = document.getElementById("e-n-tab-title-910744941");
37
38            if (tabConnexion && tabInscription) {
39                const isInscriptionActive = tabInscription.getAttribute("aria-selected") === "true";
40
41
42
43                if (isInscriptionActive) {
44
45                    tabConnexion.click();
46                    clearInterval(tryActivateConnexion);
47
48                }
49            } else {
50
51            }
52        }, 100); // vérifie toutes les 200ms
53
54        // Arrêt de sécurité après 5 secondes
55        setTimeout(() => clearInterval(tryActivateConnexion), 1000);
56    }
57});
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78/*
79document.addEventListener("DOMContentLoaded", function() {
80    // Vérifie régulièrement si Natively et l'objet info sont disponibles
81    var checkNativelyInterval = setInterval(function() {
82        if (typeof window.natively !== 'undefined') {
83            console.log("Natively SDK chargé : ", window.natively);
84            
85            // Vérifier la disponibilité de l'objet info
86            if (typeof window.info !== 'undefined' && typeof window.info.browserInfo === 'function') {
87                const browserInfo = info.browserInfo();
88                alert('Natively chargé. isAndroidApp: ' + browserInfo.isAndroidApp + ', isIOSApp: ' + browserInfo.isIOSApp + ', isNativeApp: ' + browserInfo.isNativeApp);
89
90                if (browserInfo.isIOSApp) {
91                    document.querySelectorAll('.apple-signin').forEach(function(button) {
92                        button.style.display = 'flex'; // Rend le bouton visible pour iOS
93                    });
94                }
95
96                // Arrêter l'intervalle une fois que l'objet est disponible
97                clearInterval(checkNativelyInterval);
98            } else {
99                console.log("L'objet 'info' ou sa méthode 'browserInfo' n'est pas encore disponible.");
100            }
101        } else {
102            console.log("Natively SDK n'est pas encore chargé.");
103        }
104    }, 500); // Vérifie toutes les 500ms
105});
106
107
108
109document.addEventListener("DOMContentLoaded", function () {
110  const checkNativelyInterval = setInterval(function () {
111    // SDK détecté ?
112    if (typeof window.natively !== 'undefined') {
113      let info;
114      try {
115        info = window.info || new NativelyInfo();
116      } catch (e) {
117        return;
118      }
119
120      // Vérifie que info.browserInfo existe
121      if (typeof info.browserInfo === 'function') {
122        const browserInfo = info.browserInfo();
123
124        // ✅ Dans l'app native iOS ?
125        if (browserInfo.isIOSApp && browserInfo.isNativeApp) {
126          // ✅ SweetAlert2 disponible ?
127        if (typeof Swal !== 'undefined' && typeof Swal.fire === 'function') {
128          Swal.fire({
129            icon: 'info',
130            title: 'Information importante',
131            html: `
132              <p><strong>Un problème temporaire empêchait certaines connexions sur iPhone.</strong></p><br>
133              <p>Ce problème est désormais <strong>résolu</strong>.</p><br>
134              <p>Merci de <strong>mettre à jour l’application</strong> si vous rencontrez toujours des problèmes.</p><br>
135              <p>N’hésitez pas à nous contacter en cas de besoin.</p><br>
136              <p>Merci pour votre confiance 🙏</p>
137            `,
138            confirmButtonText: 'Fermer'
139          });
140        }
141
142
143          // Active le bouton Apple si présent
144          document.querySelectorAll('.apple-signin').forEach(function (button) {
145            button.style.display = 'flex';
146          });
147        }
148
149        // Stopper la boucle
150        clearInterval(checkNativelyInterval);
151      }
152    }
153  }, 500);
154});
155
156*/
157

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.