diff --git a/app/assets/javascripts/discourse/controllers/share_controller.js b/app/assets/javascripts/discourse/controllers/share_controller.js index 93811b37e55..6dedc2e04ec 100644 --- a/app/assets/javascripts/discourse/controllers/share_controller.js +++ b/app/assets/javascripts/discourse/controllers/share_controller.js @@ -27,6 +27,17 @@ Discourse.ShareController = Discourse.Controller.extend({ close: function() { this.set('link', ''); return false; + }, + + popupHeights: { + twitter: 265, + facebook: 315, + googlePlus: 600 + }, + + sharePopup: function(target, url) { + window.open(url, '', 'menubar=no,toolbar=no,resizable=yes,scrollbars=yes,width=600,height=' + this.popupHeights[target]); + return false; } }); diff --git a/app/assets/javascripts/discourse/templates/share.js.handlebars b/app/assets/javascripts/discourse/templates/share.js.handlebars index 914538db04b..dedd3be98b6 100644 --- a/app/assets/javascripts/discourse/templates/share.js.handlebars +++ b/app/assets/javascripts/discourse/templates/share.js.handlebars @@ -1,5 +1,14 @@

{{view.title}}

-