mirror of
https://github.com/gorhill/uBlock.git
synced 2024-11-10 09:07:54 +01:00
Mind drop events in filter expression field of logger
Related discussion: https://github.com/uBlockOrigin/uBlock-issues/issues/3036#issuecomment-1867497436
This commit is contained in:
parent
d7063a052f
commit
c8b7d1a526
3 changed files with 18 additions and 1 deletions
|
@ -1,5 +1,6 @@
|
||||||
## Fixes / changes
|
## Fixes / changes
|
||||||
|
|
||||||
|
- [Improve `xml-prune` scriptlet](https://github.com/gorhill/uBlock/commit/d7063a052f)
|
||||||
- [Fix message entries overflowing in logger](https://github.com/gorhill/uBlock/commit/49c8310e22)
|
- [Fix message entries overflowing in logger](https://github.com/gorhill/uBlock/commit/49c8310e22)
|
||||||
- [Add support for `application/x-javascript` in `replace=` option](https://github.com/gorhill/uBlock/commit/abeadf18eb)
|
- [Add support for `application/x-javascript` in `replace=` option](https://github.com/gorhill/uBlock/commit/abeadf18eb)
|
||||||
- [Extend support for differential updates to imported lists](https://github.com/gorhill/uBlock/commit/443c1f81e1)
|
- [Extend support for differential updates to imported lists](https://github.com/gorhill/uBlock/commit/443c1f81e1)
|
||||||
|
|
|
@ -2251,6 +2251,22 @@ const rowFilterer = (( ) => {
|
||||||
dom.cl.toggle(ev.target, 'on');
|
dom.cl.toggle(ev.target, 'on');
|
||||||
builtinFilterExpression();
|
builtinFilterExpression();
|
||||||
});
|
});
|
||||||
|
dom.on('#filterInput > input', 'drop', ev => {
|
||||||
|
const dropItem = item => {
|
||||||
|
if ( item.kind !== 'string' ) { return false; }
|
||||||
|
item.getAsString(s => {
|
||||||
|
qs$('#filterInput > input').value = s;
|
||||||
|
parseInput();
|
||||||
|
filterAll();
|
||||||
|
});
|
||||||
|
return true;
|
||||||
|
};
|
||||||
|
for ( const item of ev.dataTransfer.items ) {
|
||||||
|
if ( dropItem(item) === false ) { continue; }
|
||||||
|
ev.preventDefault();
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
// https://github.com/gorhill/uBlock/issues/404
|
// https://github.com/gorhill/uBlock/issues/404
|
||||||
// Ensure page state is in sync with the state of its various widgets.
|
// Ensure page state is in sync with the state of its various widgets.
|
||||||
|
|
|
@ -55,7 +55,7 @@
|
||||||
<span id="filterExprGroup">
|
<span id="filterExprGroup">
|
||||||
<button id="filterButton" class="iconified notext" data-i18n-title="loggerRowFiltererButtonTip"><span class="fa-icon">filter</span><span class="hover"></span></button>
|
<button id="filterButton" class="iconified notext" data-i18n-title="loggerRowFiltererButtonTip"><span class="fa-icon">filter</span><span class="hover"></span></button>
|
||||||
<span id="filterInput">
|
<span id="filterInput">
|
||||||
<input type="search" placeholder="logFilterPrompt">
|
<input type="search" placeholder="logFilterPrompt" spellcheck="false">
|
||||||
<span id="filterExprButton" class="button fa-icon expanded" data-i18n-title="loggerRowFiltererBuiltinTip">angle-up</span>
|
<span id="filterExprButton" class="button fa-icon expanded" data-i18n-title="loggerRowFiltererBuiltinTip">angle-up</span>
|
||||||
<div id="filterExprPicker">
|
<div id="filterExprPicker">
|
||||||
<div><span data-filtex="!" data-i18n="loggerRowFiltererBuiltinNot"></span><span data-filtex="\t--\t|\t<<\t|\t##" data-i18n="loggerRowFiltererBuiltinBlocked"></span><span data-filtex="\t\+\+\t|\t\*\*\t|\t#@#" data-i18n="loggerRowFiltererBuiltinAllowed"></span><span data-filtex="[$,](?:csp|permissions|removeparam|redirect-rule|replace|urltransform)=|\t\<\<\t" data-i18n="loggerRowFiltererBuiltinModified"></span></div>
|
<div><span data-filtex="!" data-i18n="loggerRowFiltererBuiltinNot"></span><span data-filtex="\t--\t|\t<<\t|\t##" data-i18n="loggerRowFiltererBuiltinBlocked"></span><span data-filtex="\t\+\+\t|\t\*\*\t|\t#@#" data-i18n="loggerRowFiltererBuiltinAllowed"></span><span data-filtex="[$,](?:csp|permissions|removeparam|redirect-rule|replace|urltransform)=|\t\<\<\t" data-i18n="loggerRowFiltererBuiltinModified"></span></div>
|
||||||
|
|
Loading…
Reference in a new issue