Merge pull request #4756 from pichalite/post-sharing

change post sharing to use /post/pid url
v1.18.x
Barış Soner Uşaklı 9 years ago committed by GitHub
commit b29715fa37

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

Loading…
Cancel
Save