From d1f2dbc5aa6908a766a77cc8b7817eaed32ede5b Mon Sep 17 00:00:00 2001 From: Thomas G <62822072+Thomasluigi07@users.noreply.github.com> Date: Mon, 31 Oct 2022 19:50:26 +1100 Subject: [PATCH] Add warning --- public/js/detect.js | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/public/js/detect.js b/public/js/detect.js index 63cd975..d8b812a 100644 --- a/public/js/detect.js +++ b/public/js/detect.js @@ -19,8 +19,16 @@ function addWarning() { document.body.appendChild(alertDiv); } +function addDatabaseBackupRestoreWarning() { + let alertDiv = document.createElement("div"); + alertDiv.innerHTML = "Please do not change any settings, accept/decline friend requests, send/delete messages or post to your feed. We are currently in the process of backing up our database."; + alertDiv.setAttribute("id","alert"); + document.body.appendChild(alertDiv); +} + if (window.document.location.hostname == "archblox.com") { console.log("User is on " + window.document.location.hostname + ". Supported URL."); + addDatabaseBackupRestoreWarning(); } else { console.log("User is on " + window.document.location.hostname + ". Unsupported/legacy URL."); addWarning();