From f67dc417c3b6f2e234bf7f441d9dfa361a210c3f Mon Sep 17 00:00:00 2001 From: Tim McIver Date: Tue, 21 Jul 2015 21:31:47 -0400 Subject: [PATCH] Prevent dialog stating "Bookmark added. You can close the window now." from displaying when creating a bookmark using bookmarklet. Addresses issue 136. --- js/bookmarklet.js | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/js/bookmarklet.js b/js/bookmarklet.js index 93d206ba..f295619b 100644 --- a/js/bookmarklet.js +++ b/js/bookmarklet.js @@ -50,10 +50,7 @@ $(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); + window.close(); } else { OC.dialogs.alert(t("bookmarks", "Some Error happened."), t("bookmarks", "Error"), null, true); @@ -71,7 +68,3 @@ $(document).ready(function () { }); }); }); - -function closeWindow() { - window.close(); -}