1
0
mirror of https://github.com/gorhill/uBlock.git synced 2024-11-05 18:32:30 +01:00

Merge branch 'master' of github.com:gorhill/uBlock

This commit is contained in:
Raymond Hill 2018-05-16 11:50:58 -04:00
commit 3a78e73e4b
No known key found for this signature in database
GPG Key ID: 25E1490B761470C2

View File

@ -765,9 +765,12 @@
}
}
// Extract update frequency information
matches = head.match(/(?:^|\n)(?:!|# )[\t ]*Expires:[\t ]*(\d+)[\t ]*day/i);
matches = head.match(/(?:^|\n)(?:!|# )[\t ]*Expires:[\t ]*(\d+)[\t ]*(day|hour)/i);
if ( matches !== null ) {
v = Math.max(parseInt(matches[1], 10), 1);
if ( matches[2].toLowerCase() === 'hour' ) {
v = Math.ceil(v / 24);
}
if ( v !== listEntry.updateAfter ) {
this.assets.registerAssetSource(assetKey, { updateAfter: v });
}