From 5f2f9086cc0536f496cdedb88c9029c15637045b Mon Sep 17 00:00:00 2001 From: Tim Krehan Date: Sun, 26 May 2019 17:18:26 +0200 Subject: [PATCH] fixed regex --- js/list.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/js/list.js b/js/list.js index ef1f744..cd51fa7 100644 --- a/js/list.js +++ b/js/list.js @@ -9,7 +9,7 @@ $(document).ready(function () { function highlightNewEntry(){ var cookies = document.cookie; - var cookieRegExp = new RegExp(/;?\s+newItem=(\d+)/g); + var cookieRegExp = new RegExp(/[;]{0,1}\s{0,1}newItem=(\d+)/g); var match = cookieRegExp.exec(cookies); console.log(cookies); if(match!=null){