From 21f48fce565a034d0005f887bd89647c527d52ce Mon Sep 17 00:00:00 2001 From: Patrick Tang <36460266+patricksptang@users.noreply.github.com> Date: Sun, 17 Nov 2024 20:43:22 -0800 Subject: [PATCH] send alert on example server --- step-web/src/main/webapp/js/step_ready.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/step-web/src/main/webapp/js/step_ready.js b/step-web/src/main/webapp/js/step_ready.js index 62c661d05f..4fc07b3f67 100644 --- a/step-web/src/main/webapp/js/step_ready.js +++ b/step-web/src/main/webapp/js/step_ready.js @@ -497,9 +497,10 @@ } //iframe + var isExampleServer = (window.location.origin.indexOf("examples.stepbible.org") > -1); if (window != window.top) { step.util.showOrHideTutorial(true); - if (window.location.origin.indexOf("examples.stepbible.org") == -1) { // Don't want user to break out to examples.stepbible.org + if (!isExampleServer) { // Don't want user to break out to examples.stepbible.org var button = $(""); $(".headerButtons").append(button); button.on("click", function () { @@ -507,6 +508,8 @@ }); } } + else if (isExampleServer) + alert("Please use www.stepbible.org instead of this server which will only show examples."); var ua = navigator.userAgent.toLowerCase(); if (ua.indexOf('firefox') > -1) $("#panel-icon").hide(); // Firefox has some issues with this. var pos = Math.max(ua.indexOf("ipad"), ua.indexOf("iphone"));