|
@ -95,6 +95,15 @@ |
|
|
var redirections = {}; |
|
|
var redirections = {}; |
|
|
var µm = this; |
|
|
var µm = this; |
|
|
|
|
|
|
|
|
|
|
|
var fixLocation = function(location) { |
|
|
|
|
|
// https://github.com/chrisaljoudi/uBlock/issues/418
|
|
|
|
|
|
// We now support built-in external filter lists
|
|
|
|
|
|
if ( /^https?:/.test(location) === false ) { |
|
|
|
|
|
location = 'assets/thirdparties/' + location; |
|
|
|
|
|
} |
|
|
|
|
|
return location; |
|
|
|
|
|
}; |
|
|
|
|
|
|
|
|
// selected lists
|
|
|
// selected lists
|
|
|
var onSelectedHostsFilesLoaded = function(store) { |
|
|
var onSelectedHostsFilesLoaded = function(store) { |
|
|
var lists = store.liveHostsFiles; |
|
|
var lists = store.liveHostsFiles; |
|
@ -139,11 +148,7 @@ |
|
|
continue; |
|
|
continue; |
|
|
} |
|
|
} |
|
|
hostsFileEntry = locations[location]; |
|
|
hostsFileEntry = locations[location]; |
|
|
availableHostsFiles['assets/thirdparties/' + location] = hostsFileEntry; |
|
|
|
|
|
if ( hostsFileEntry.old !== undefined ) { |
|
|
|
|
|
redirections[hostsFileEntry.old] = location; |
|
|
|
|
|
delete hostsFileEntry.old; |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
availableHostsFiles[fixLocation(location)] = hostsFileEntry; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
// Now get user's selection of lists
|
|
|
// Now get user's selection of lists
|
|
|