-
-
Save krismeister/6251518 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(['jquery', 'mb/core', 'responsive/lib/jquery.cookie'], factory); | |
} else { | |
// Browser globals (root is window) | |
factory(root.jQuery, root.mb); | |
} | |
}(this, | |
function($, mb) { | |
//grab mb namespace, until mb/core is converted to requireJs | |
mb = mb || window.mb; | |
var log = mb.logger, | |
utilsNS = mb.nameSpace('utils'); | |
function setEmailCookie(){ | |
$.cookie('MBUSA_ESM_STATUS','1',{ path: '/', expires:new Date( 2042, 1, 1 ) }); | |
}; | |
function removeEmailCookie(){ | |
$.removeCookie('MBUSA_ESM_STATUS', { path: '/' }); | |
}; | |
utilsNS.cookie = { | |
setEmailCookie : setEmailCookie, | |
removeEmailCookie : removeEmailCookie | |
}; | |
return utilsNS.cookie; | |
} | |
)); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment