mirror of
https://github.com/gorhill/uBlock.git
synced 2026-03-11 09:04:36 +00:00
Revert "Allow user to change CodeMirror input style in "My filters""
This reverts commit cf7777e9fd.
This commit is contained in:
parent
457dd7acdb
commit
ea0c400c51
1 changed files with 2 additions and 16 deletions
|
|
@ -28,7 +28,7 @@ import { onBroadcast } from './broadcast.js';
|
|||
|
||||
/******************************************************************************/
|
||||
|
||||
const cmOptions = {
|
||||
const cmEditor = new CodeMirror(qs$('#userFilters'), {
|
||||
autoCloseBrackets: true,
|
||||
autofocus: true,
|
||||
extraKeys: {
|
||||
|
|
@ -47,21 +47,7 @@ const cmOptions = {
|
|||
styleActiveLine: {
|
||||
nonEmpty: true,
|
||||
},
|
||||
};
|
||||
(( ) => {
|
||||
try {
|
||||
const url = new URL(self.top.location.href);
|
||||
const input = url.searchParams.get('input');
|
||||
if ( input === 't' ) {
|
||||
cmOptions.inputStyle = 'textarea';
|
||||
} else if ( input === 'c' ) {
|
||||
cmOptions.inputStyle = 'contenteditable';
|
||||
}
|
||||
} catch {
|
||||
}
|
||||
})();
|
||||
|
||||
const cmEditor = new CodeMirror(qs$('#userFilters'), cmOptions);
|
||||
});
|
||||
|
||||
uBlockDashboard.patchCodeMirrorEditor(cmEditor);
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue