Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
<script>
$(document).ready(function() {
[highlight #FCE94F][COLOR=#CC0000][i][b][COLOR=#EF2929]$.ajax({
method: "GET",
url: baseURL + "/api/v1/auth",
headers: {
"OTCSTicket": getCookie("LLCookie")
},[/color][/b][/i][/color][/highlight]
success: function( data ) {
var userData = data.data; //if the REST API is successful look for the JSON Response from the Server using Dev Tools
var first_name =userData.first_name
var last_name =userData.last_name
alert("Hi Ya you Dawg..."+ first_name+last_name);
}, error: function(response, textStatus, errorThrown) {
var message = "[" + response.status + "] " + errorThrown;
console.error("Error calling auth for user: " + message + "\n" + response.responseText);
}
});
});
function getCookie(cname) {
var name = cname + "=";
var decodedCookie = decodeURIComponent(document.cookie);
var ca = decodedCookie.split(';');
for(var i = 0; i <ca.length; i++) {
var c = ca[i];
while (c.charAt(0) == ' ') {
c = c.substring(1);
}
if (c.indexOf(name) == 0) {
return c.substring(name.length, c.length);
}
}
return "";
}
</script>