Skip to content

Commit

Permalink
closes #3468
Browse files Browse the repository at this point in the history
  • Loading branch information
barisusakli committed Aug 25, 2015
1 parent edba11f commit cf36f7b
Showing 1 changed file with 2 additions and 9 deletions.
11 changes: 2 additions & 9 deletions public/src/client/topic/postTools.js
Expand Up @@ -139,10 +139,7 @@ define('forum/topic/postTools', ['share', 'navigator', 'components', 'translator
selection = window.getSelection ? window.getSelection() : document.selection.createRange();

if ($(selection.baseNode).parents('[component="post/content"]').length > 0) {
var snippet = selection.toString();
if (snippet.length) {
selectionText = '> ' + snippet.replace(/\n/g, '\n> ') + '\n\n';
}
selectionText = selection.toString();
}

var username = getUserName(selectionText ? $(selection.baseNode) : button);
Expand Down Expand Up @@ -177,10 +174,6 @@ define('forum/topic/postTools', ['share', 'navigator', 'components', 'translator
if(err) {
return app.alertError(err.message);
}
var quoted = '';
if(post) {
quoted = '> ' + post.replace(/\n/g, '\n> ') + '\n\n';
}

$(window).trigger('action:composer.addQuote', {
tid: tid,
Expand All @@ -189,7 +182,7 @@ define('forum/topic/postTools', ['share', 'navigator', 'components', 'translator
pid: pid,
username: username,
topicName: topicName,
text: quoted
text: post
});
});
}
Expand Down

0 comments on commit cf36f7b

Please sign in to comment.