diff --git a/www/js/ui.js b/www/js/ui.js index 38377f42..a5410905 100644 --- a/www/js/ui.js +++ b/www/js/ui.js @@ -394,7 +394,7 @@ function queue(pos, src) { if (data.id == null || data.type == null) { makeAlert("Error", "Failed to parse link " + link + ". Please check that it is correct", - "alert-danger") + "alert-danger", true) .insertAfter($("#addfromurl")); } else { emitQueue.push({ diff --git a/www/js/util.js b/www/js/util.js index d2bf2bd3..b66171b9 100644 --- a/www/js/util.js +++ b/www/js/util.js @@ -1,4 +1,4 @@ -function makeAlert(title, text, klass) { +function makeAlert(title, text, klass, textOnly) { if(!klass) { klass = "alert-info"; } @@ -7,8 +7,9 @@ function makeAlert(title, text, klass) { var al = $("
").addClass("alert") .addClass(klass) - .html(text) .appendTo(wrap); + textOnly ? al.text(text) : al.html(text) ; + $("