code review: overwrite list title only for external filter lists

This commit is contained in:
gorhill 2015-12-13 18:00:43 -05:00
parent 6d102b648a
commit a2fb13653a
1 changed files with 1 additions and 1 deletions

View File

@ -458,7 +458,7 @@
var listMeta = µb.remoteBlacklists[path];
// https://github.com/gorhill/uBlock/issues/313
// Always try to fetch the name if this is an external filter list.
if ( listMeta && listMeta.title === '' || /^https?:/.test(path) ) {
if ( listMeta && (listMeta.title === '' || listMeta.group === 'custom') ) {
var matches = details.content.slice(0, 1024).match(/(?:^|\n)!\s*Title:([^\n]+)/i);
if ( matches !== null ) {
listMeta.title = matches[1].trim();