Last active
December 21, 2015 04:39
-
-
Save antoinegrant/6251033 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(function (root, factory) { | |
if (typeof define === 'function' && define.amd) { | |
// AMD. Register as an anonymous module. | |
define(['mb/core', 'jQuery', 'handlebars', 'responsive/lib/jquery.cookie'], factory); | |
} else { | |
// Browser globals (root is window) | |
root.returnExports = factory(root.mb, root.jQuery, root.Handlebars); | |
} | |
}(this, | |
function(mb, $, Handlebars) { | |
//firstly make sure the namespace exists: | |
var log = mb.logger, | |
cookiesNs = mb.nameSpace('utils','cookies'); | |
function setEmailCookie(){ | |
$.cookie('MBUSA_ESM_STATUS','1',{ path: '/', expires:new Date( 2042, 1, 1 ) }); | |
}; | |
function removeEmailCookie(){ | |
$.removeCookie('MBUSA_ESM_STATUS', { path: '/' }); | |
}; | |
cookiesNs = { | |
setEmailCookie : setEmailCookie, | |
removeEmailCookie : removeEmailCookie | |
}; | |
return cookiesNs; | |
} | |
)); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment