Breaking: make exclude-by-domain command exclude sub-domain

This commit is contained in:
eight 2019-03-28 13:33:58 +08:00
parent 162e5fe744
commit 439386f090

View File

@ -361,7 +361,7 @@ function styleExcluded({exclusions}, type) {
function getExcludeRule(type) {
const u = new URL(tabURL);
if (type === 'domain') {
return u.origin + '/*';
return u.protocol + '//*.' + u.host + '/*';
}
return escapeGlob(u.origin + u.pathname) + '*';
}