mirror of
https://github.com/tim-krehan/shopping-list.git
synced 2024-11-23 22:30:41 +01:00
fixed regex
This commit is contained in:
parent
066754912b
commit
5f2f9086cc
1 changed files with 1 additions and 1 deletions
|
@ -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){
|
||||
|
|
Loading…
Reference in a new issue