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-17 07:33:31 -04:00
commit f2b2a0dca5
No known key found for this signature in database
GPG Key ID: 25E1490B761470C2

View File

@ -755,7 +755,7 @@
// https://github.com/gorhill/uBlock/issues/313
// Always try to fetch the name if this is an external filter list.
if ( listEntry.title === '' || listEntry.group === 'custom' ) {
matches = head.match(/(?:^|\n)(?:!|# )[\t ]*Title:([^\n]+)/i);
matches = head.match(/(?:^|\n)(?:!|# )[\t ]*Title[\t ]*:([^\n]+)/i);
if ( matches !== null ) {
// https://bugs.chromium.org/p/v8/issues/detail?id=2869
// JSON.stringify/JSON.parse is to work around String.slice()
@ -765,10 +765,10 @@
}
}
// Extract update frequency information
matches = head.match(/(?:^|\n)(?:!|# )[\t ]*Expires:[\t ]*(\d+)[\t ]*(day|hour)/i);
matches = head.match(/(?:^|\n)(?:!|# )[\t ]*Expires[\t ]*:[\t ]*(\d+)[\t ]*(h)?/i);
if ( matches !== null ) {
v = Math.max(parseInt(matches[1], 10), 1);
if ( matches[2].toLowerCase() === 'hour' ) {
if ( matches[2] !== undefined ) {
v = Math.ceil(v / 24);
}
if ( v !== listEntry.updateAfter ) {