X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=plugins%2FBookmark%2Fbookmarkpopup.js;h=4904b07e24102a954b942d8354ef4e2048e17054;hb=fb70dc02362155c8951a1a0ad66a668f1f857ca5;hp=29f314ed06236ec837d0c1e4192fe73d486412db;hpb=1cc8be4d8b4931a138f97fbd86c5f31dbb93da02;p=quix0rs-gnu-social.git diff --git a/plugins/Bookmark/bookmarkpopup.js b/plugins/Bookmark/bookmarkpopup.js index 29f314ed06..4904b07e24 100644 --- a/plugins/Bookmark/bookmarkpopup.js +++ b/plugins/Bookmark/bookmarkpopup.js @@ -2,6 +2,13 @@ $(document).ready( function() { var form = $('#form_new_bookmark'); form.append(''); + function doClose() { + self.close(); + // If in popup blocker situation, we'll have to redirect back. + setTimeout(function() { + window.location = $('#url').val(); + }, 100); + } form.ajaxForm({dataType: 'xml', timeout: '60000', beforeSend: function(formData) { @@ -11,12 +18,12 @@ $(document).ready( error: function (xhr, textStatus, errorThrown) { form.removeClass('processing'); form.find('#submit').removeClass('disabled'); - self.close(); + doClose(); }, success: function(data, textStatus) { form.removeClass('processing'); form.find('#submit').removeClass('disabled'); - self.close(); + doClose(); }}); }