From b65566a2d34c046d4409f755e93aac3f68cdd91b Mon Sep 17 00:00:00 2001 From: Ricardo Dias Date: Tue, 19 Sep 2017 18:23:59 +0100 Subject: [PATCH] Removed spaces from cockies name with trim --- index.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/index.html b/index.html index 1c8b468..d0e709c 100644 --- a/index.html +++ b/index.html @@ -13,7 +13,7 @@ const name = "username" + "="; const cookie_array = document.cookie.split(';'); for(let i = 0; i < cookie_array.length; i++) { - let c = cookie_array[i]; + let c = cookie_array[i].trim(); if (c.indexOf(name) == 0) { return c.substring(name.length, c.length); }