diff --git a/media/js/impala/global.js b/media/js/impala/global.js index 1d00d15464..b329bda931 100644 --- a/media/js/impala/global.js +++ b/media/js/impala/global.js @@ -29,9 +29,10 @@ $('.island .listing-grid').bind('grid.init', function(e, data) { } }); +z.visitor = z.Storage('visitor'); (function() { // Show the bad-browser message if it has not been dismissed - if (!$.cookie('amo_impala_bad_browser') && $('body').hasClass('badbrowser')) { + if (!z.visitor.get('seen_badbrowser_warning') && $('body').hasClass('badbrowser')) { $('#site-nonfx').show(); } })(); @@ -40,14 +41,13 @@ $(function() { "use strict"; // Show the first visit banner. - var firstvisitcookie = 'amo_impala_user_seen'; - if (!$.cookie(firstvisitcookie)) { + if (!z.visitor.get('seen_impala_first_visit')) { $('body').addClass('firstvisit'); - $.cookie(firstvisitcookie, '1'); + z.visitor.set('seen_impala_first_visit', 1) } $("#site-nonfx .close").click(function() { - $.cookie('amo_impala_bad_browser', '1'); + z.visitor.set('seen_badbrowser_warning', 1); }); //Truncate text in Firefox. diff --git a/settings.py b/settings.py index ba14b3c875..39788ef2c0 100644 --- a/settings.py +++ b/settings.py @@ -448,6 +448,7 @@ MINIFY_BUNDLES = { 'js/zamboni/tabs.js', 'js/lib/jquery.cookie.js', + 'js/zamboni/storage.js', 'js/zamboni/global.js', 'js/amo2009/global.js', 'js/impala/ratingwidget.js', @@ -455,7 +456,6 @@ MINIFY_BUNDLES = { 'js/amo2009/home.js', 'js/zamboni/l10n.js', 'js/zamboni/debouncer.js', - 'js/zamboni/storage.js', # Homepage 'js/zamboni/homepage.js',