|
|
@ -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;
|
|
|
|