summaryrefslogtreecommitdiff
path: root/modules/comment/comment.js
diff options
context:
space:
mode:
authorAngie Byron <webchick@24967.no-reply.drupal.org>2009-04-26 19:18:46 +0000
committerAngie Byron <webchick@24967.no-reply.drupal.org>2009-04-26 19:18:46 +0000
commitbda52632a5aa033d44151c224a39236b223c6b0e (patch)
treeda56b8095f58963707655312071d41de95adca84 /modules/comment/comment.js
parenta4dc8467bbe69ba984be31309f536af74dc64e73 (diff)
downloadbrdo-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.js12
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');
}
- }
+ });
}
};