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){