From 1993b20e19d7758472d183caeecf8d5b83bb25d3 Mon Sep 17 00:00:00 2001 From: gorhill Date: Tue, 24 Feb 2015 18:29:58 -0500 Subject: [PATCH] this fixes #881 --- src/js/storage.js | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/js/storage.js b/src/js/storage.js index 9b21396d0..4975f935c 100644 --- a/src/js/storage.js +++ b/src/js/storage.js @@ -333,6 +333,14 @@ var onRawListLoaded = function(details) { if ( details.content !== '' ) { + var listMeta = µb.remoteBlacklists[path]; + if ( listMeta && listMeta.title === '' ) { + var matches = details.content.slice(0, 1024).match(/(?:^|\n)!\s*Title:([^\n]+)/i); + if ( matches !== null ) { + listMeta.title = matches[1].trim(); + } + } + //console.debug('µBlock.getCompiledFilterList/onRawListLoaded: compiling "%s"', path); details.content = µb.compileFilters(details.content); µb.assets.put(compiledPath, details.content);