mirror of
https://github.com/gorhill/uBlock.git
synced 2024-11-07 03:12:33 +01:00
fix #3406
This commit is contained in:
parent
a81d2a759b
commit
9fb455d2df
@ -721,6 +721,9 @@
|
|||||||
|
|
||||||
/******************************************************************************/
|
/******************************************************************************/
|
||||||
|
|
||||||
|
// https://github.com/gorhill/uBlock/issues/3406
|
||||||
|
// Lower minimum update period to 1 day.
|
||||||
|
|
||||||
µBlock.extractFilterListMetadata = function(assetKey, raw) {
|
µBlock.extractFilterListMetadata = function(assetKey, raw) {
|
||||||
var listEntry = this.availableFilterLists[assetKey];
|
var listEntry = this.availableFilterLists[assetKey];
|
||||||
if ( listEntry === undefined ) { return; }
|
if ( listEntry === undefined ) { return; }
|
||||||
@ -742,7 +745,7 @@
|
|||||||
// Extract update frequency information
|
// Extract update frequency information
|
||||||
matches = head.match(/(?:^|\n)![\t ]*Expires:[\t ]*([\d]+)[\t ]*days?/i);
|
matches = head.match(/(?:^|\n)![\t ]*Expires:[\t ]*([\d]+)[\t ]*days?/i);
|
||||||
if ( matches !== null ) {
|
if ( matches !== null ) {
|
||||||
v = Math.max(parseInt(matches[1], 10), 2);
|
v = Math.max(parseInt(matches[1], 10), 1);
|
||||||
if ( v !== listEntry.updateAfter ) {
|
if ( v !== listEntry.updateAfter ) {
|
||||||
this.assets.registerAssetSource(assetKey, { updateAfter: v });
|
this.assets.registerAssetSource(assetKey, { updateAfter: v });
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user