mirror of
https://github.com/gorhill/uBlock.git
synced 2024-11-10 09:07:54 +01: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
1 changed files with 3 additions and 3 deletions
|
@ -55,7 +55,7 @@ const parseExpires = s => {
|
|||
if ( matches === null ) { return 0; }
|
||||
let updateAfter = parseInt(matches[1], 10);
|
||||
if ( matches[2] === 'h' ) {
|
||||
updateAfter = Math.ceil(updateAfter / 6) / 4;
|
||||
updateAfter = Math.max(updateAfter, 4) / 24;
|
||||
}
|
||||
return updateAfter;
|
||||
};
|
||||
|
@ -81,10 +81,10 @@ const extractMetadataFromList = (content, fields) => {
|
|||
out.lastModified = (new Date(out.lastModified)).getTime() || 0;
|
||||
}
|
||||
if ( out.expires ) {
|
||||
out.expires = Math.max(parseExpires(out.expires), 0.5);
|
||||
out.expires = parseExpires(out.expires);
|
||||
}
|
||||
if ( out.diffExpires ) {
|
||||
out.diffExpires = Math.max(parseExpires(out.diffExpires), 0.25);
|
||||
out.diffExpires = parseExpires(out.diffExpires);
|
||||
}
|
||||
return out;
|
||||
};
|
||||
|
|
Loading…
Reference in a new issue