Commit da7f952a authored by Dries's avatar Dries

- Patch #141131 by mfer: remember anonyous comment posters.

parent d1e28d42
// $Id$
if (Drupal.jsEnabled) {
$(document).ready(function() {
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] + "]").val(cookie);
}
}
});
};
Drupal.comment = {};
Drupal.comment.getCookie = function(name) {
var search = name + '=';
var returnValue = '';
if (document.cookie.length > 0) {
offset = document.cookie.indexOf(search);
if (offset != -1) {
offset += search.length;
var end = document.cookie.indexOf(';', offset);
if (end == -1) {
end = document.cookie.length;
}
returnValue = unescape(document.cookie.substring(offset, end));
}
}
return returnValue;
}
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment