/** * Retrieves a cookies value * @param {string} cname Cookie name * @returns {string} Cookie value */ function getCookie(cname) { let name = cname + "="; let decodedCookie = decodeURIComponent(document.cookie); let ca = decodedCookie.split(';'); for(let i = 0; i