diff --git a/src/js/yunohost/controllers/home.js b/src/js/yunohost/controllers/home.js index c0c9e924..82fe671a 100644 --- a/src/js/yunohost/controllers/home.js +++ b/src/js/yunohost/controllers/home.js @@ -27,8 +27,7 @@ }) .done(function(xml){ // Get viewed security alerts from cookie - $.cookie.json = true; - var viewedItems = $.cookie('ynhSecurityViewedItems') || []; + var viewedItems = Cookies.get('ynhSecurityViewedItems') || []; // Loop through items $('item', xml).each(function(k, v) { @@ -57,8 +56,8 @@ } }); // Saved viewed items to cookie - $.cookie('ynhSecurityViewedItems', viewedItems, { - expire: 7 + Cookies.set('ynhSecurityViewedItems', viewedItems, { + expires: 7 }); }) .fail(function() { @@ -158,4 +157,4 @@ }, 'GET', {}, false); }); -})(); \ No newline at end of file +})();