mirror of
https://github.com/gorhill/uBlock.git
synced 2024-09-01 16:49:39 +02:00
Enable "not permissions" filtering expression in logger
Related feedback: https://github.com/uBlockOrigin/uBlock-issues/discussions/2714#discussioncomment-6959861
This commit is contained in:
parent
7ca18f77d9
commit
9bd483bec3
@ -179,8 +179,11 @@ body[dir="rtl"] #netInspector #filterExprPicker {
|
||||
background-color: rgb(var(--primary-70) / 25%);
|
||||
border: 1px solid rgb(var(--primary-70));
|
||||
}
|
||||
#netInspector #filterExprPicker span.on[data-filtex] {
|
||||
#netInspector #filterExprPicker span.on[data-filtex],
|
||||
#filterExprButton.active {
|
||||
background-color: rgb(var(--primary-70) / 40%);
|
||||
}
|
||||
#netInspector #filterExprPicker span.on[data-filtex] {
|
||||
border: 1px solid rgb(var(--primary-70));
|
||||
}
|
||||
|
||||
|
@ -2213,16 +2213,14 @@ const rowFilterer = (( ) => {
|
||||
dom.cl.toggle(ev.target, 'expanded');
|
||||
};
|
||||
|
||||
const onToggleBuiltinExpression = function(ev) {
|
||||
const builtinFilterExpression = function() {
|
||||
builtinFilters.length = 0;
|
||||
|
||||
dom.cl.toggle(ev.target, 'on');
|
||||
const filtexElems = qsa$(ev.currentTarget, '[data-filtex]');
|
||||
const filtexElems = qsa$('#filterExprPicker [data-filtex]');
|
||||
const orExprs = [];
|
||||
let not = false;
|
||||
for ( const filtexElem of filtexElems ) {
|
||||
let filtex = dom.attr(filtexElem, 'data-filtex');
|
||||
let active = dom.cl.has(filtexElem, 'on');
|
||||
const filtex = filtexElem.dataset.filtex;
|
||||
const active = dom.cl.has(filtexElem, 'on');
|
||||
if ( filtex === '!' ) {
|
||||
if ( orExprs.length !== 0 ) {
|
||||
builtinFilters.push({
|
||||
@ -2250,11 +2248,15 @@ const rowFilterer = (( ) => {
|
||||
dom.on('#filterButton', 'click', onFilterButton);
|
||||
dom.on('#filterInput > input', 'input', onFilterChangedAsync);
|
||||
dom.on('#filterExprButton', 'click', onToggleExtras);
|
||||
dom.on('#filterExprPicker', 'click', '[data-filtex]', onToggleBuiltinExpression);
|
||||
dom.on('#filterExprPicker', 'click', '[data-filtex]', ev => {
|
||||
dom.cl.toggle(ev.target, 'on');
|
||||
builtinFilterExpression();
|
||||
});
|
||||
|
||||
// https://github.com/gorhill/uBlock/issues/404
|
||||
// Ensure page state is in sync with the state of its various widgets.
|
||||
parseInput();
|
||||
builtinFilterExpression();
|
||||
filterAll();
|
||||
|
||||
return { filterOne, filterAll };
|
||||
|
@ -66,9 +66,9 @@
|
||||
</div>
|
||||
<div><span data-filtex="!" data-i18n="loggerRowFiltererBuiltinNot"></span><span data-filtex="\t(?:0,)?1\t" data-i18n="loggerRowFiltererBuiltin1p"></span><span data-filtex="\t(?:3(?:,\d)?|0,3)\t" data-i18n="loggerRowFiltererBuiltin3p"></span><span data-filtex="\t0,\d\t">tabless</span></div>
|
||||
<div><span data-filtex="!" data-i18n="loggerRowFiltererBuiltinNot"></span><span data-filtex="\tget\t">get</span><span data-filtex="\thead\t">head</span><span data-filtex="\tpost\t">post</span></div>
|
||||
<div><span data-filtex="!" data-i18n="loggerRowFiltererBuiltinNot"></span>
|
||||
<div><span data-filtex="!" data-i18n="loggerRowFiltererBuiltinNot" class="on"></span>
|
||||
<span style="flex-direction: column;">
|
||||
<div><span data-filtex="\bcsp=[^\t]+\t(?:--|\+\+)\t">csp</span><span data-filtex="\bpermissions=[^\t]+\t(?:--|\+\+)\t">permissions</span><span data-filtex="\bredirect-rule=[^\t]+\t(?:--|\+\+)\t">redirect</span></div>
|
||||
<div><span data-filtex="\bcsp=[^\t]+\t(?:--|\+\+)\t">csp</span><span data-filtex="\bpermissions=[^\t]+\t(?:--|\+\+)\t" class="on">permissions</span><span data-filtex="\bredirect-rule=[^\t]+\t(?:--|\+\+)\t">redirect</span></div>
|
||||
<div><span data-filtex="\bremoveparam=[^\t]+\t(?:--|\+\+)\t">removeparam</span><span data-filtex="\burltransform=[^\t]+\t(?:--|\+\+)\t">urltransform</span></div>
|
||||
</span>
|
||||
</div>
|
||||
|
Loading…
Reference in New Issue
Block a user