Skip to content

Commit

Permalink
send alert on example server
Browse files Browse the repository at this point in the history
  • Loading branch information
patricksptang committed Nov 18, 2024
1 parent f37ef35 commit 21f48fc
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion step-web/src/main/webapp/js/step_ready.js
Original file line number Diff line number Diff line change
Expand Up @@ -497,16 +497,19 @@
}

//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 = $("<button class='stepBreakout btn btn-default btn-xs'><span class='glyphicon glyphicon-new-window'></button>");
$(".headerButtons").append(button);
button.on("click", function () {
window.open(window.location);
});
}
}
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"));
Expand Down

0 comments on commit 21f48fc

Please sign in to comment.