Created
October 28, 2013 16:50
-
-
Save alexstrat/7200426 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(a) { | |
var f = "linkedin_oauth_" + IN.ENV.auth.api_key; | |
if (!IN.ENV.auth.is_set_client_auth_cookie || a === "" || a === null) { | |
window.setTimeout(function d() { | |
document.cookie = f + "=null;path=/;secure;expires=0"; | |
document.cookie = f + "_crc=null;path=/;expires=0" | |
}, 0); | |
return | |
} | |
if (typeof a === $_CONSTANTS.types.string) { | |
try { | |
a = JSON.parse(a) | |
} catch (c) {} | |
} | |
if ((typeof a) === $_CONSTANTS.types.object) { | |
a = encodeURIComponent(JSON.stringify(a)) | |
} | |
window.setTimeout(function b() { | |
document.cookie = f + "=" + a + ";path=/;secure;"; | |
if (IN.ENV.js.credentialsCookieCrc) { | |
document.cookie = f + "_crc=" + IN.Util.crc32(a) + ";path=/;" | |
} | |
}, 0) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment