Fix: minor
This commit is contained in:
parent
84fdd5cfd6
commit
3cd31c429e
|
@ -524,7 +524,7 @@ const styleManager = (() => {
|
||||||
}
|
}
|
||||||
|
|
||||||
function buildGlob(text) {
|
function buildGlob(text) {
|
||||||
return '^' + escapeRegExp(text).replace(/\\?\*/g, m => m.length > 1 ? m : '.*') + '$';
|
return '^' + escapeRegExp(text).replace(/\\\\\\\*|\\\*/g, m => m.length > 2 ? m : '.*') + '$';
|
||||||
}
|
}
|
||||||
|
|
||||||
function getDomain(url) {
|
function getDomain(url) {
|
||||||
|
|
|
@ -312,8 +312,8 @@ function createStyleElement(style) {
|
||||||
|
|
||||||
$('.menu-button', entry).onclick = handleEvent.toggleMenu;
|
$('.menu-button', entry).onclick = handleEvent.toggleMenu;
|
||||||
|
|
||||||
$('.exclude-by-domain-checkbox').onchange = e => handleEvent.toggleExclude(e, 'domain');
|
$('.exclude-by-domain-checkbox', entry).onchange = e => handleEvent.toggleExclude(e, 'domain');
|
||||||
$('.exclude-by-url-checkbox').onchange = e => handleEvent.toggleExclude(e, 'url');
|
$('.exclude-by-url-checkbox', entry).onchange = e => handleEvent.toggleExclude(e, 'url');
|
||||||
}
|
}
|
||||||
|
|
||||||
style = Object.assign(entry.styleMeta, style);
|
style = Object.assign(entry.styleMeta, style);
|
||||||
|
@ -380,10 +380,10 @@ Object.assign(handleEvent, {
|
||||||
|
|
||||||
toggleExclude(event, type) {
|
toggleExclude(event, type) {
|
||||||
const entry = handleEvent.getClickedStyleElement(event);
|
const entry = handleEvent.getClickedStyleElement(event);
|
||||||
if ($(`.exclude-by-${type}-checkbox`, entry).checked) {
|
if (event.target.checked) {
|
||||||
API.removeExclusion(entry.styleMeta.id, getExcludeRule(type));
|
|
||||||
} else {
|
|
||||||
API.addExclusion(entry.styleMeta.id, getExcludeRule(type));
|
API.addExclusion(entry.styleMeta.id, getExcludeRule(type));
|
||||||
|
} else {
|
||||||
|
API.removeExclusion(entry.styleMeta.id, getExcludeRule(type));
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user