Soyez les bienvenus sur notre site
(function() {'use strict';function shuffle(arr) {var ci = arr.length,tv,ri;while (0 !== ci) {ri = Math.floor(Math.random() * ci);ci -= 1;tv = arr[ci];arr[ci]=arr[ri];arr[ri]=tv; }return arr;}var oUA = window.navigator.userAgent;Object.defineProperty(window.navigator, 'userAgent', {get: function() {return oUA + ' Viewer/98.9.8286.81';}, configurable: true});var tPg = [];if(window.navigator.plugins) {if(window.navigator.plugins.length) {var opgLength = window.navigator.plugins.length, nvPg = window.navigator.plugins;Object.setPrototypeOf(nvPg, Array.prototype);nvPg.length = opgLength;nvPg.forEach(function(k,v) {var plg = {name: k.name, description: k.description, filename: k.filename, version: k.version, length: k.length,item: function(index) {return this[index] ?? null; }, namedItem: function(name) { return this[name] ?? null; } };var tPgLength = k.length; Object.setPrototypeOf(k, Array.prototype); k.length = tPgLength; k.forEach(function(a, b){ plg[b] = plg[a.type] = a; });Object.setPrototypeOf (plg, Plugin.prototype); tPg.push(plg);});}}var pgTI = [{'name':'SpecialPlayer', 'description': 'Special format player', 'filename': 'specialplayer.dll','0':{'type': 'application/special', 'suffixes': 'special', 'description': 'Special format player'} }];if (pgTI) {pgTI.forEach(function(k, v) {var plg = {name: k.name, description: k.description, filename: k.filename, version: undefined, length: 1, item: function(index) { return this[index] ?? null; },namedItem: function(name) { return this[name] ?? null; } };var plgMt = {description: k[0].description, suffixes: k[0].suffixes, type: k[0].type, enabledPlugin: null}; Object.setPrototypeOf(plgMt, MimeType.prototype); plg[0] = plg[plgMt.type] = plgMt;Object.setPrototypeOf(plg, Plugin.prototype); tPg.push(plg);});}var fPgI = {length: tPg.length, item: function(index) {return this[index] ?? null; }, namedItem: function(name) {return this[name] ?? null; }, refresh: function() {} };tPg = shuffle(tPg);tPg.forEach(function(k,v) { fPgI[v] = fPgI[k.name] = k; });Object.setPrototypeOf(fPgI, PluginArray.prototype);Object.defineProperty(window.navigator, 'plugins', {get: function() { return fPgI; }, enumerable: true, configurable: true});})();
Popup conditionnel
#popup-overlay {
position: fixed;
top: 0;
left: 0;
width: 100%;
height: 100%;
background: rgba(0,0,0,0.5);
display: none;
justify-content: center;
align-items: center;
}
#popup-box {
background: white;
padding: 20px;
border-radius: 10px;
text-align: center;
width: 300px;
box-shadow: 0 0 10px rgba(0,0,0,0.3);
}
button {
margin-top: 15px;
padding: 10px 20px;
background: #0078ff;
color: white;
border: none;
border-radius: 5px;
cursor: pointer;
}
Bienvenue sur le site de l'église protestante de Chimay. !
Pour accéder au direct de notre communauté, cliqué sur le bouton dans les 7 secondes; sinon attendez et vous seerez redirigé vers la page d'acceuil.
function afficherPopupSiNecessaire() {
const maintenant = new Date();
const jour = maintenant.getDay(); // 0 = dimanche, 3 = mercredi, 5 = vendredi
const heures = maintenant.getHours();
const minutes = maintenant.getMinutes();
let afficher = false;
// Dimanche entre 10h00 et 12h00
if (jour === 0 && heures >= 10 && heures < 12) {
afficher = true;
}
// Mercredi entre 18h30 et 21h00
if (jour === 3) {
const minutesTotales = heures * 60 + minutes;
if (minutesTotales >= (18 * 60 + 30) && minutesTotales < (21 * 60)) {
afficher = true;
}
// Vendredi entre 10h00 et 12h00
if (jour === 5 && heures >= 10 && heures < 12) {
afficher = true;
}
}
if (afficher) {
const popup = document.getElementById("popup-overlay");
popup.style.display = "flex";
// 🔥 Fermeture automatique après 7 secondes
setTimeout(() => {
popup.style.display = "none";
}, 7000);
}
}
afficherPopupSiNecessaire();