mirror of https://github.com/gorhill/uBlock.git
Extend support for differential updates to imported lists
Related issue: https://github.com/uBlockOrigin/uBlock-issues/issues/3028
This commit is contained in:
parent
d13cd30043
commit
443c1f81e1
|
@ -1204,8 +1204,19 @@ const getAssetDiffDetails = assetKey => {
|
|||
out.writeTime = cacheEntry.writeTime;
|
||||
const assetEntry = assetSourceRegistry[assetKey];
|
||||
if ( assetEntry === undefined ) { return; }
|
||||
if ( Array.isArray(assetEntry.cdnURLs) === false ) { return; }
|
||||
if ( Array.isArray(assetEntry.cdnURLs) ) {
|
||||
out.cdnURLs = assetEntry.cdnURLs.slice();
|
||||
} else if ( reIsExternalPath.test(assetKey) ) {
|
||||
out.cdnURLs = [ assetKey ];
|
||||
} else if ( typeof assetEntry.contentURL === 'string' ) {
|
||||
out.cdnURLs = [ assetEntry.contentURL ];
|
||||
} else if ( Array.isArray(assetEntry.contentURL) ) {
|
||||
out.cdnURLs = assetEntry.contentURL.slice(0).filter(url =>
|
||||
reIsExternalPath.test(url)
|
||||
);
|
||||
}
|
||||
if ( Array.isArray(out.cdnURLs) === false ) { return; }
|
||||
if ( out.cdnURLs.length === 0 ) { return; }
|
||||
return out;
|
||||
};
|
||||
|
||||
|
|
Loading…
Reference in New Issue