- var $placeholders = $(context)
- .find('[data-history-node-last-comment-timestamp]')
- .once('history')
- .filter(function () {
- var $placeholder = $(this);
- var lastCommentTimestamp = parseInt($placeholder.attr('data-history-node-last-comment-timestamp'), 10);
- var nodeID = $placeholder.closest('[data-history-node-id]').attr('data-history-node-id');
- if (Drupal.history.needsServerCheck(nodeID, lastCommentTimestamp)) {
- nodeIDs.push(nodeID);
- // Hide this placeholder link until it is certain we'll need it.
- hide($placeholder);
- return true;
- }
- else {
- // Remove this placeholder link from the DOM because we won't need
- // it.
- remove($placeholder);
- return false;
- }
- });
+ var $placeholders = $(context).find('[data-history-node-last-comment-timestamp]').once('history').filter(function () {
+ var $placeholder = $(this);
+ var lastCommentTimestamp = parseInt($placeholder.attr('data-history-node-last-comment-timestamp'), 10);
+ var nodeID = $placeholder.closest('[data-history-node-id]').attr('data-history-node-id');
+ if (Drupal.history.needsServerCheck(nodeID, lastCommentTimestamp)) {
+ nodeIDs.push(nodeID);
+
+ hide($placeholder);
+ return true;
+ }
+
+ remove($placeholder);
+ return false;
+ });