Skip to content

Instantly share code, notes, and snippets.

@shmuelie
Created September 8, 2016 19:57
Show Gist options
  • Save shmuelie/99f2b2e7c6fd520d53753c277aba97dd to your computer and use it in GitHub Desktop.
Save shmuelie/99f2b2e7c6fd520d53753c277aba97dd to your computer and use it in GitHub Desktop.
Unblock Forbes
var b,c,d=new Date(+new Date+2592e11),e=Cookies.getJSON("global_ad_params")||{};e.ab={value:"off",expiration:d.getTime()},b=_.isUndefined(urlParams.force_ab)?Cookies.get("forbes_ab"):urlParams.force_ab.toUpperCase(),c=b&&b[0].match("A")?b[0]:"A",Cookies.set("forbes_ab",c,_.merge({expires:d})),Cookies.set("global_ad_params",e,_.merge({expires:d})),a?(Cookies.set("welcomeAd",!0,_.merge({expires:d})),Cookies.set("dailyWelcomeCookie",!0,_.merge({expires:d}))):(Cookies.remove("welcomeAd"),Cookies.remove("dailyWelcomeCookie"));
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment