fixed regex

This commit is contained in:
Tim Krehan 2019-05-26 17:18:26 +02:00
parent 066754912b
commit 5f2f9086cc

View file

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