From 62fb0920993e57293b1f68e5b9bc94c6d5599630 Mon Sep 17 00:00:00 2001 From: pichalite Date: Tue, 14 Jun 2016 19:58:17 +0000 Subject: [PATCH] change post sharing to use /post/pid url --- public/src/modules/share.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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;