mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-11-06 14:05:46 +01:00
fixes double hashes in share links
This commit is contained in:
@@ -484,7 +484,7 @@ define(['composer', 'forum/pagination'], function(composer, pagination) {
|
||||
|
||||
$('#post-container').on('shown.bs.dropdown', '.share-dropdown', function() {
|
||||
var pid = $(this).parents('.post-row').attr('data-pid');
|
||||
$('#post_' + pid + '_link').val(window.location.href + "#" + pid);
|
||||
$('#post_' + pid + '_link').val(window.location.protocol + '//' + window.location.host + window.location.pathname + '#' + pid);
|
||||
// without the setTimeout can't select the text in the input
|
||||
setTimeout(function() {
|
||||
$('#post_' + pid + '_link').putCursorAtEnd().select();
|
||||
|
||||
Reference in New Issue
Block a user