summaryrefslogtreecommitdiff
path: root/modules/comment/comment.js
diff options
context:
space:
mode:
Diffstat (limited to 'modules/comment/comment.js')
-rw-r--r--modules/comment/comment.js23
1 files changed, 1 insertions, 22 deletions
diff --git a/modules/comment/comment.js b/modules/comment/comment.js
index 58f00dc6b..753e99252 100644
--- a/modules/comment/comment.js
+++ b/modules/comment/comment.js
@@ -4,7 +4,7 @@
Drupal.behaviors.comment = {
attach: function (context, settings) {
$.each(['name', 'homepage', 'mail'], function () {
- var cookie = Drupal.comment.getCookie('comment_info_' + this);
+ var cookie = $.cookie('Drupal.visitor.' + this);
if (cookie) {
$('#comment-form input[name=' + this + ']', context).once('comment').val(cookie);
}
@@ -12,25 +12,4 @@ Drupal.behaviors.comment = {
}
};
-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 = decodeURIComponent(document.cookie.substring(offset, end).replace(/\+/g, '%20'));
- }
- }
-
- return returnValue;
-};
-
})(jQuery);