mirror of
https://github.com/gorhill/uMatrix.git
synced 2024-06-17 17:55:00 +12:00
Compare commits
8 commits
Author | SHA1 | Date | |
---|---|---|---|
|
13c45f1224 | ||
|
eb5cbe7841 | ||
|
c2b4adb7f1 | ||
|
be3990e24e | ||
|
d970d97e0e | ||
|
d5cce55f1c | ||
|
192365cc84 | ||
|
30c12dabdc |
|
@ -16,25 +16,6 @@
|
|||
"assets/thirdparties/publicsuffix.org/list/effective_tld_names.dat"
|
||||
]
|
||||
},
|
||||
"malware-0": {
|
||||
"content": "filters",
|
||||
"title": "Malware Domain List",
|
||||
"contentURL": [
|
||||
"https://www.malwaredomainlist.com/hostslist/hosts.txt",
|
||||
"assets/thirdparties/www.malwaredomainlist.com/hostslist/hosts.txt"
|
||||
]
|
||||
},
|
||||
"malware-1": {
|
||||
"content": "filters",
|
||||
"title": "Malware domains",
|
||||
"contentURL": [
|
||||
"https://mirror.cedia.org.ec/malwaredomains/justdomains",
|
||||
"https://mirror1.malwaredomains.com/files/justdomains",
|
||||
"assets/thirdparties/mirror1.malwaredomains.com/files/justdomains",
|
||||
"assets/thirdparties/mirror1.malwaredomains.com/files/justdomains.txt"
|
||||
],
|
||||
"supportURL": "http://www.malwaredomains.com/"
|
||||
},
|
||||
"dpollock-0": {
|
||||
"content": "filters",
|
||||
"updateAfter": 11,
|
||||
|
@ -45,25 +26,15 @@
|
|||
],
|
||||
"supportURL": "https://someonewhocares.org/hosts/"
|
||||
},
|
||||
"hphosts": {
|
||||
"content": "filters",
|
||||
"updateAfter": 11,
|
||||
"title": "hpHosts’ Ad and tracking servers",
|
||||
"contentURL": [
|
||||
"https://hosts-file.net/.%5Cad_servers.txt",
|
||||
"assets/thirdparties/hosts-file.net/ad_servers.txt"
|
||||
],
|
||||
"supportURL": "https://hosts-file.net/"
|
||||
},
|
||||
"mvps-0": {
|
||||
"content": "filters",
|
||||
"updateAfter": 11,
|
||||
"title": "MVPS HOSTS",
|
||||
"contentURL": [
|
||||
"http://winhelp2002.mvps.org/hosts.txt",
|
||||
"https://winhelp2002.mvps.org/hosts.txt",
|
||||
"assets/thirdparties/winhelp2002.mvps.org/hosts.txt"
|
||||
],
|
||||
"supportURL": "http://winhelp2002.mvps.org/"
|
||||
"supportURL": "https://winhelp2002.mvps.org/"
|
||||
},
|
||||
"plowe-0": {
|
||||
"content": "filters",
|
||||
|
|
2
dist/version
vendored
2
dist/version
vendored
|
@ -1 +1 @@
|
|||
1.4.0
|
||||
1.4.4
|
||||
|
|
|
@ -86,7 +86,7 @@ uDom('.what').text(details.url);
|
|||
return s;
|
||||
};
|
||||
|
||||
let renderParams = function(parentNode, rawURL) {
|
||||
let renderParams = function(parentNode, rawURL, depth = 0) {
|
||||
let a = document.createElement('a');
|
||||
a.href = rawURL;
|
||||
if ( a.search.length === 0 ) { return false; }
|
||||
|
@ -108,9 +108,9 @@ uDom('.what').text(details.url);
|
|||
let name = safeDecodeURIComponent(param.slice(0, pos));
|
||||
let value = safeDecodeURIComponent(param.slice(pos + 1));
|
||||
li = liFromParam(name, value);
|
||||
if ( reURL.test(value) ) {
|
||||
if ( depth < 2 && reURL.test(value) ) {
|
||||
let ul = document.createElement('ul');
|
||||
renderParams(ul, value);
|
||||
renderParams(ul, value, depth + 1);
|
||||
li.appendChild(ul);
|
||||
}
|
||||
parentNode.appendChild(li);
|
||||
|
|
|
@ -552,12 +552,22 @@
|
|||
var usedCount = this.ubiquitousBlacklist.count;
|
||||
var duplicateCount = this.ubiquitousBlacklist.duplicateCount;
|
||||
|
||||
this.mergeHostsFileContent(details.content);
|
||||
// https://www.reddit.com/r/uMatrix/comments/ftebgz/
|
||||
// Be ready to deal with a removed asset.
|
||||
|
||||
if ( typeof details.content === 'string' && details.content !== '' ) {
|
||||
this.mergeHostsFileContent(details.content);
|
||||
}
|
||||
|
||||
usedCount = this.ubiquitousBlacklist.count - usedCount;
|
||||
duplicateCount = this.ubiquitousBlacklist.duplicateCount - duplicateCount;
|
||||
|
||||
let hostsFileMeta = this.liveHostsFiles.get(details.assetKey);
|
||||
const hostsFileMeta = this.liveHostsFiles.get(details.assetKey);
|
||||
if ( hostsFileMeta === undefined ) {
|
||||
this.liveHostsFiles.delete(details.assetKey);
|
||||
return;
|
||||
}
|
||||
|
||||
hostsFileMeta.entryCount = usedCount + duplicateCount;
|
||||
hostsFileMeta.entryUsedCount = usedCount;
|
||||
};
|
||||
|
|
|
@ -14,18 +14,22 @@ cp ./assets/assets.json $DES/
|
|||
if [ -n "${TRAVIS_TAG}" ]; then
|
||||
pushd .. > /dev/null
|
||||
git clone --depth 1 https://github.com/uBlockOrigin/uAssets.git
|
||||
git checkout 84dc2761abb4193bb34290aa6d90266610f735f6
|
||||
popd > /dev/null
|
||||
fi
|
||||
|
||||
mkdir $DES/thirdparties
|
||||
cp -R ../uAssets/thirdparties/hosts-file.net $DES/thirdparties/
|
||||
cp -R ../uAssets/thirdparties/mirror1.malwaredomains.com $DES/thirdparties/
|
||||
pushd ../uAssets
|
||||
git checkout 84dc2761abb4193bb34290aa6d90266610f735f6
|
||||
popd
|
||||
cp -R ../uAssets/thirdparties/pgl.yoyo.org $DES/thirdparties/
|
||||
cp -R ../uAssets/thirdparties/publicsuffix.org $DES/thirdparties/
|
||||
cp -R ../uAssets/thirdparties/someonewhocares.org $DES/thirdparties/
|
||||
cp -R ../uAssets/thirdparties/winhelp2002.mvps.org $DES/thirdparties/
|
||||
cp -R ../uAssets/thirdparties/www.malwaredomainlist.com $DES/thirdparties/
|
||||
mkdir $DES/umatrix
|
||||
cp -R ../uAssets/recipes/* $DES/umatrix/
|
||||
pushd ../uAssets
|
||||
git checkout master
|
||||
popd
|
||||
|
||||
echo "done."
|
||||
|
|
Loading…
Reference in a new issue