diff --git a/global.js b/global.js index 7fc73d7..259a95f 100644 --- a/global.js +++ b/global.js @@ -54,6 +54,7 @@ document.addEventListener("DOMContentLoaded", function () { console.log("Bootstrap loaded successfully"); $(document).ready(function () { var embedded = getUrlParameter("embed"); + var inModal = getUrlParameter("modal"); // Set required attribute on inputs associated with labels containing $('label:has(i[title="Required field"])').each(function () { @@ -100,7 +101,7 @@ document.addEventListener("DOMContentLoaded", function () { data: formData, success: function (response) { // Close the modal if `modal=1` is set - if (embedded === "1") { + if (inModal === "1") { window.top.closeQuizModal(); } else { // Else call the nextContent function