mirror of
https://github.com/gorhill/uBlock.git
synced 2024-10-06 09:37:12 +02:00
Lower maximum Expires
value to 4h
Related issue: https://github.com/uBlockOrigin/uBlock-issues/issues/2899
This commit is contained in:
parent
8ed1ad9c9d
commit
2360bc02f3
@ -55,7 +55,7 @@ const parseExpires = s => {
|
|||||||
if ( matches === null ) { return 0; }
|
if ( matches === null ) { return 0; }
|
||||||
let updateAfter = parseInt(matches[1], 10);
|
let updateAfter = parseInt(matches[1], 10);
|
||||||
if ( matches[2] === 'h' ) {
|
if ( matches[2] === 'h' ) {
|
||||||
updateAfter = Math.ceil(updateAfter / 6) / 4;
|
updateAfter = Math.max(updateAfter, 4) / 24;
|
||||||
}
|
}
|
||||||
return updateAfter;
|
return updateAfter;
|
||||||
};
|
};
|
||||||
@ -81,10 +81,10 @@ const extractMetadataFromList = (content, fields) => {
|
|||||||
out.lastModified = (new Date(out.lastModified)).getTime() || 0;
|
out.lastModified = (new Date(out.lastModified)).getTime() || 0;
|
||||||
}
|
}
|
||||||
if ( out.expires ) {
|
if ( out.expires ) {
|
||||||
out.expires = Math.max(parseExpires(out.expires), 0.5);
|
out.expires = parseExpires(out.expires);
|
||||||
}
|
}
|
||||||
if ( out.diffExpires ) {
|
if ( out.diffExpires ) {
|
||||||
out.diffExpires = Math.max(parseExpires(out.diffExpires), 0.25);
|
out.diffExpires = parseExpires(out.diffExpires);
|
||||||
}
|
}
|
||||||
return out;
|
return out;
|
||||||
};
|
};
|
||||||
|
Loading…
Reference in New Issue
Block a user