JSON [[undefined]] при сохранение cookie



  • Люди добрые, подскажите, если нужно закину на qiwi за помощь.

    https://i.imgur.com/OwZpeEe.png

    https://i.imgur.com/bxuas1M.png

    for (var i = 0; i < [[SAVED_COOKIES]].length; i++) {
    var month = [[SAVED_COOKIES]][i].expires.month
    if(month.length == 1) {var month = '0'+month}
    var day = [[SAVED_COOKIES]][i].expires.day_of_month
    if(day.length == 1) {var day = '0'+day}
    var year = [[SAVED_COOKIES]][i].expires.year
    var hour = [[SAVED_COOKIES]][i].expires.hour
    if(hour.length == 1) {var hour = '0'+hour}
    var minute = [[SAVED_COOKIES]][i].expires.minute
    if(minute.length == 1) {var minute = '0'+minute}
    var second = [[SAVED_COOKIES]][i].expires.second
    if(second.length == 1) {var second = '0'+second}
    var millisecond = [[SAVED_COOKIES]][i].expires.millisecond
    var time = year+'-'+month+'-'+day+'T'+hour+':'+minute+':'+second;
    var time = _parse_date(time,"yyyy-MM-ddThh:mm:ss").getTime()
    var time = time/1000;
    var time = time+'.'+millisecond;
    delete [[SAVED_COOKIES]][i].creation;
    delete [[SAVED_COOKIES]][i].last_access;
    delete [[SAVED_COOKIES]][i].expires;
    var secure = [[SAVED_COOKIES]][i].secure;
    var httponly = [[SAVED_COOKIES]][i].httponly;
    var domain = [[SAVED_COOKIES]][i].domain;
    delete [[SAVED_COOKIES]][i].secure;
    delete [[SAVED_COOKIES]][i].has_expires;
    delete [[SAVED_COOKIES]][i].hostOnly;
    delete [[SAVED_COOKIES]][i].httponly;
    delete [[SAVED_COOKIES]][i].session;
    [[SAVED_COOKIES]][i].expirationDate = parseInt(time);
    var regex = /^([a-z0-9]{1,})./gi;
    var res = regex.exec(domain);
    if( !res ){[[SAVED_COOKIES]][i].hostOnly = false;}else{[[SAVED_COOKIES]][i].hostOnly = true;}
    if((secure).indexOf("0")>=0){[[SAVED_COOKIES]][i].secure = false;}else{[[SAVED_COOKIES]][i].secure = true;}
    if((httponly).indexOf("0")>=0){[[SAVED_COOKIES]][i].httponly = false;}else{[[SAVED_COOKIES]][i].httponly = true;}
    [[SAVED_COOKIES]][i].session = false;
    [[SAVED_COOKIES]][i].id = i+1;
    [[SAVED_COOKIES]][i].storeId = "0";
    [[SAVED_COOKIES]][i].sameSite = "no_restriction";
    }


Log in to reply
 

  • 6
  • 4
  • 3
  • 10
  • 13
  • 4
  • 4
  • 9