SPECIAL ONLINE PRAYER SESSION
Join the special online prayer session.
Now Playing: Live Program
Tip: If the stream doesn’t start automatically, click Play and ensure your browser allows autoplay with sound.
Offering Details
Espees Code
Bank Details
-
Bank: Parallex Bank
-
Account Name: Christ Embassy
-
Account No: 2030074162
Get connected with us on social media networks:
© 2025 Copyright: Christ Embassy lagos Zone 5
// =====================
// Prayer Form
// =====================
const prayerForm = document.getElementById("prayerForm");
const prayerInput = document.getElementById("prayerPoint");
const prayerToastSuccess = new bootstrap.Toast(document.getElementById("prayerToastSuccess"));
const prayerToastError = new bootstrap.Toast(document.getElementById("prayerToastError"));
const submitPrayerBtn = document.getElementById("submitPrayerBtn");
if (prayerForm) {
prayerForm.addEventListener("submit", function (e) {
e.preventDefault();
// Show spinner
submitPrayerBtn.disabled = true;
submitPrayerBtn.innerHTML = `
Submitting...`;
frappe.db.insert({
doctype: "Prayer Request", // 🔹 Replace with your Doctype
expectations: prayerInput.value
}).then(() => {
prayerToastSuccess.show();
prayerForm.reset();
}).catch(() => {
prayerToastError.show();
}).finally(() => {
// Reset button
submitPrayerBtn.disabled = false;
submitPrayerBtn.innerHTML = "Submit";
});
});
}
});
// Prayer Form
// const prayerForm = document.getElementById("prayerForm");
// const prayerInput = document.getElementById("prayerPoint");
// const prayerToastSuccess = new bootstrap.Toast(document.getElementById("prayerToastSuccess"));
// const prayerToastError = new bootstrap.Toast(document.getElementById("prayerToastError"));
// if (prayerForm) {
// prayerForm.addEventListener("submit", function (e) {
// e.preventDefault();
// frappe.db.insert({
// doctype: "Prayer Request", // 🔹 Replace with your Doctype name
// expectations: prayerInput.value
// }).then(() => {
// prayerToastSuccess.show();
// prayerForm.reset();
// }).catch(() => {
// prayerToastError.show();
// });
// });
// }
// });
// ===== Video Controls =====
playBtn.addEventListener('click', () => {
if (videoEl.paused) videoEl.play();
else videoEl.pause();
playBtn.innerHTML = videoEl.paused
? '
Play'
: '
Pause';
});
muteBtn.addEventListener('click', () => {
videoEl.muted = !videoEl.muted;
muteBtn.innerHTML = videoEl.muted
? '
Unmute'
: '
Mute';
});
fsBtn.addEventListener('click', () => {
if (videoEl.requestFullscreen) videoEl.requestFullscreen();
else if (videoEl.webkitEnterFullscreen) videoEl.webkitEnterFullscreen();
});
videoEl.addEventListener('playing', () => { offlineCover.style.display = 'none'; });
videoEl.addEventListener('pause', () => { offlineCover.style.display = 'flex'; });
// ===== Pusher Viewer Count (STRICTLY real-time) =====
const pusher = new Pusher('fdd88c80d58be76c8150', { cluster: 'eu', encrypted: true });
const channel = pusher.subscribe('analytics-channel');
channel.bind('viewer-count-updated', function(data) {
if (data && typeof data.count === "number") {
viewerCountEl.textContent = data.count.toLocaleString();
}
});
// ===== Share / Copy =====
copyLinkBtn.addEventListener('click', async () => {
try {
await navigator.clipboard.writeText(location.href);
copyLinkBtn.classList.remove('btn-outline-primary');
copyLinkBtn.classList.add('btn-success');
copyLinkBtn.innerHTML = '
Copied';
setTimeout(() => {
copyLinkBtn.classList.add('btn-outline-primary');
copyLinkBtn.classList.remove('btn-success');
copyLinkBtn.innerHTML = '
Copy Link';
}, 2000);
} catch {
alert("Could not copy link. Please copy manually.");
}
});
shareBtn.addEventListener('click', async () => {
if (navigator.share) {
try { await navigator.share({ title: document.title, url: location.href }); } catch {}
} else {
copyLinkBtn.click();
}
});
// COMMENT BOX
document.addEventListener("DOMContentLoaded", function () {
const sendBtn = document.getElementById("sendCommentBtn");
sendBtn.innerHTML = `
${sendBtn.innerHTML}`;
const btnContent = sendBtn.querySelector(".fade-btn-content");
const originalHTML = btnContent.innerHTML;
sendBtn.addEventListener("click", function () {
const comment = document.getElementById("commentBox").value.trim();
if (!comment) {
frappe.msgprint("Please write a comment before sending.");
return;
}
const btnWidth = sendBtn.offsetWidth;
sendBtn.style.width = `${btnWidth}px`;
btnContent.classList.add("hidden");
sendBtn.disabled = true;
sendBtn.classList.add("btn-pulsing");
setTimeout(() => {
btnContent.innerHTML = `
Sending...
`;
btnContent.classList.remove("hidden");
}, 250);
// Call your server method
frappe.call({
method: "your_app.api.add_comment", // <-- Replace this
args: { comment: comment },
callback: function (r) {
restoreButton();
if (!r.exc) {
frappe.msgprint("Comment submitted successfully!");
document.getElementById("commentBox").value = "";
} else {
frappe.msgprint("Something went wrong. Try again.");
}
},
error: function () {
restoreButton();
frappe.msgprint("Error submitting comment.");
}
});
});
function restoreButton() {
btnContent.classList.add("hidden");
setTimeout(() => {
btnContent.innerHTML = originalHTML;
btnContent.classList.remove("hidden");
sendBtn.disabled = false;
sendBtn.style.width = "";
sendBtn.classList.remove("btn-pulsing");
}, 250);
}
});