diff --git a/backend/web/static/base.js b/backend/web/static/base.js index 129a1e7fb445fe16092231111d362143278c909e..9660ed5cc57d5f8518ddb40ab7ae2b9510ae5739 100644 --- a/backend/web/static/base.js +++ b/backend/web/static/base.js @@ -21,7 +21,7 @@ var dashboard_url = ""; // Render a message by appending the data to the messages box. The message id is -// availble, potentially for future translations/locale handling +// available, potentially for future translations/locale handling // @param string id Message ID\ // @param string message Message in the default language (English) // @param string type Type of message, currently only "error" renders in @@ -402,8 +402,11 @@ function getFormElement(node, context) { console.log("Getting form element", node); if (node.attributes.node_type == "script") { - window.console.log("Skipping because node_type is script"); - return ''; + return ( + `<script src="` + + node.attributes.src + + `" defer>` + ); } if (node.type == "img") { @@ -697,3 +700,8 @@ $.urlParam = function (name) { } return decodeURI(results[1]) || 0; }; + +window.alert = function(message) { + window.console.log("Alert: " + message); + renderMessage('', message, "info"); +}; diff --git a/backend/web/templates/base.html b/backend/web/templates/base.html index bcf15f82692b18add12f59205733c6424c546089..b569b881565c2fa2f5eb9a1b3859a1300773ac4b 100644 --- a/backend/web/templates/base.html +++ b/backend/web/templates/base.html @@ -12,7 +12,6 @@ {% if demo %} <script src="static/js/demo.js"></script> {% endif %} - <script src="/kratos/.well-known/ory/webauthn.js"></script> <title>Your Stackspin Account</title> </html>