mirror of
https://github.com/titaniumnetwork-dev/Ultraviolet.git
synced 2025-05-17 05:20:01 -04:00
e
This commit is contained in:
parent
fd8064a6d9
commit
25f6b8bd5f
2 changed files with 0 additions and 32 deletions
|
@ -35507,23 +35507,7 @@ async function db(openDB) {
|
||||||
|
|
||||||
function serialize(cookies = [], meta, js) {
|
function serialize(cookies = [], meta, js) {
|
||||||
let str = '';
|
let str = '';
|
||||||
const now = new Date();
|
|
||||||
for (const cookie of cookies) {
|
for (const cookie of cookies) {
|
||||||
|
|
||||||
let expired = false;
|
|
||||||
|
|
||||||
if (cookie.set) {
|
|
||||||
if (cookie.maxAge) {
|
|
||||||
expired = cookie.set.getTime() + (cookie.maxAge * 1e3) < now;
|
|
||||||
} else if (cookie.expires) {
|
|
||||||
expired = cookie.expires > now;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
if (expired) {
|
|
||||||
|
|
||||||
continue;
|
|
||||||
};
|
|
||||||
if (!validateCookie(cookie, meta, js)) continue;
|
if (!validateCookie(cookie, meta, js)) continue;
|
||||||
if (str.length) str += '; ';
|
if (str.length) str += '; ';
|
||||||
str += cookie.name;
|
str += cookie.name;
|
||||||
|
|
|
@ -36,23 +36,7 @@ async function db(openDB) {
|
||||||
|
|
||||||
function serialize(cookies = [], meta, js) {
|
function serialize(cookies = [], meta, js) {
|
||||||
let str = '';
|
let str = '';
|
||||||
const now = new Date();
|
|
||||||
for (const cookie of cookies) {
|
for (const cookie of cookies) {
|
||||||
|
|
||||||
let expired = false;
|
|
||||||
|
|
||||||
if (cookie.set) {
|
|
||||||
if (cookie.maxAge) {
|
|
||||||
expired = cookie.set.getTime() + (cookie.maxAge * 1e3) < now;
|
|
||||||
} else if (cookie.expires) {
|
|
||||||
expired = cookie.expires > now;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
if (expired) {
|
|
||||||
|
|
||||||
continue;
|
|
||||||
};
|
|
||||||
if (!validateCookie(cookie, meta, js)) continue;
|
if (!validateCookie(cookie, meta, js)) continue;
|
||||||
if (str.length) str += '; ';
|
if (str.length) str += '; ';
|
||||||
str += cookie.name;
|
str += cookie.name;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue