Skip to content

Commit

Permalink
Apply minor improvements
Browse files Browse the repository at this point in the history
  • Loading branch information
jwbth committed Feb 27, 2021
1 parent 323a04e commit 046a136
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 11 deletions.
7 changes: 7 additions & 0 deletions src/js/Comment.js
Original file line number Diff line number Diff line change
Expand Up @@ -159,6 +159,13 @@ export default class Comment extends CommentSkeleton {
* @type {?boolean}
*/
this.isFlashNewOnSightSet = false;

/**
* Whether the comment (or its signature) is inside a table containing only one comment.
*
* @type {boolean}
*/
this.isInSingleCommentTable = false;
}

/**
Expand Down
5 changes: 3 additions & 2 deletions src/js/commentLinks.js
Original file line number Diff line number Diff line change
Expand Up @@ -81,8 +81,9 @@ async function prepare({ dataRequest }) {
[moveFromBeginning] = cd.s('es-move-from').match(/^[^[$]+/) || [];
[moveToBeginning] = cd.s('es-move-to').match(/^[^[$]+/) || [];

goToCommentToYou = `${cd.s('lp-comment-tooltip')} ${cd.mws('parentheses', cd.s('lp-comment-toyou'))}`;
goToCommentWatchedSection = `${cd.s('lp-comment-tooltip')} ${cd.mws('parentheses', cd.s('lp-comment-watchedsection'))}`;
goToCommentToYou = goToCommentWatchedSection = cd.s('lp-comment-tooltip') + ' ';
goToCommentToYou += cd.mws('parentheses', cd.s('lp-comment-toyou'));
goToCommentWatchedSection += cd.mws('parentheses', cd.s('lp-comment-watchedsection'));

const $aRegularPrototype = $('<a>')
.text(cd.s('lp-comment'))
Expand Down
9 changes: 0 additions & 9 deletions src/js/processPage.js
Original file line number Diff line number Diff line change
Expand Up @@ -328,15 +328,6 @@ function processComments(parser, feivData) {
.querySelectorAll('table.cd-commentPart .cd-signature')
.forEach((signature) => {
const commentId = signature.closest('.cd-commentPart').dataset.commentId;

/**
* Whether the comment (or its signature) is inside a table containing only one comment.
*
* @name isInSingleCommentTable
* @type {boolean}
* @memberof module:Comment
* @instance
*/
cd.comments[commentId].isInSingleCommentTable = true;
});

Expand Down

0 comments on commit 046a136

Please sign in to comment.