diff --git a/public/src/modules/share.js b/public/src/modules/share.js index c0648009f0..a6d39c5918 100644 --- a/public/src/modules/share.js +++ b/public/src/modules/share.js @@ -52,8 +52,8 @@ define('share', function() { function getPostUrl(clickedElement) { var parts = window.location.pathname.split('/'); - var postIndex = parseInt(clickedElement.parents('[data-index]').attr('data-index'), 10); - return '/' + parts[1] + '/' + parts[2] + (parts[3] ? '/' + parts[3] : '') + (postIndex ? '/' + (postIndex + 1) : ''); + var pid = parseInt(clickedElement.parents('[data-pid]').attr('data-pid'), 10); + return '/post' + (pid ? '/' + (pid) : ''); } return module;