I want to override a bit of core drupal behavior on the comment form.
If you make a comment as an anonymous user, your name and mail are stored in a cookie, and then javascript fills out the appropriate fields in subsequent comment forms using this code below:
Drupal.behaviors.comment = function (context) {
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)
.val(cookie)
.addClass('comment-processed');
}
}
};
If I don't want those fields to be filled in, I know I can just wipe out the information with further javascript, but I'm sure there's a 'cleaner' way to do it.