diff --git a/js/bookmarklet.js b/js/bookmarklet.js index 93d206ba..bd589574 100644 --- a/js/bookmarklet.js +++ b/js/bookmarklet.js @@ -50,10 +50,10 @@ $(document).ready(function () { }, success: function (data) { if (data.status === 'success') { - $('#bookmarklet_form').html(""); - OC.dialogs.alert( - t("bookmarks", "Bookmark added. You can close the window now."), - t("bookmarks", "Bookmark added successfully"), closeWindow, true); + OC.dialogs.message("Bookmark added.", "Success", undefined, [], undefined, true) + _.delay(function() { + window.close(); + }, 1e3); } else { OC.dialogs.alert(t("bookmarks", "Some Error happened."), t("bookmarks", "Error"), null, true); @@ -71,7 +71,3 @@ $(document).ready(function () { }); }); }); - -function closeWindow() { - window.close(); -}