diff options
author | Angie Byron <webchick@24967.no-reply.drupal.org> | 2009-04-26 19:18:46 +0000 |
---|---|---|
committer | Angie Byron <webchick@24967.no-reply.drupal.org> | 2009-04-26 19:18:46 +0000 |
commit | bda52632a5aa033d44151c224a39236b223c6b0e (patch) | |
tree | da56b8095f58963707655312071d41de95adca84 /modules/comment/comment.js | |
parent | a4dc8467bbe69ba984be31309f536af74dc64e73 (diff) | |
download | brdo-bda52632a5aa033d44151c224a39236b223c6b0e.tar.gz brdo-bda52632a5aa033d44151c224a39236b223c6b0e.tar.bz2 |
#444402 by kkaefer and RobLoach: Enforce coding standards on all core JavaScript.
Diffstat (limited to 'modules/comment/comment.js')
-rw-r--r-- | modules/comment/comment.js | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/modules/comment/comment.js b/modules/comment/comment.js index 38a026b72..3d2b92edd 100644 --- a/modules/comment/comment.js +++ b/modules/comment/comment.js @@ -3,16 +3,14 @@ Drupal.behaviors.comment = { attach: function(context, settings) { - var parts = new Array("name", "homepage", "mail"); - var cookie = ''; - for (i=0;i<3;i++) { - cookie = Drupal.comment.getCookie('comment_info_' + parts[i]); - if (cookie != '') { - $("#comment-form input[name=" + parts[i] + "]:not(.comment-processed)", context) + $.each(['name', 'homepage', 'mail'], function() { + var cookie = Drupal.comment.getCookie('comment_info_' + this); + if (cookie) { + $('#comment-form input[name=' + this + ']:not(.comment-processed)', context) .val(cookie) .addClass('comment-processed'); } - } + }); } }; |