1
0
mirror of https://github.com/gorhill/uBlock.git synced 2024-09-14 23:12:28 +02:00

Fix an issue in new logger export feature

Specifically, if selecting table+markdown, the export dialog
would no longer be accessible once closed.
This commit is contained in:
Raymond Hill 2019-01-14 16:52:13 -05:00
parent 093734a555
commit 5d5b05b387
No known key found for this signature in database
GPG Key ID: 25E1490B761470C2

View File

@ -1503,7 +1503,11 @@ const reloadTab = function(ev) {
// Rule
if (
(text !== '') &&
(trcl.contains('dynamicHost') || trcl.contains('dynamicUrl'))
(
trcl.contains('dynamicHost') ||
trcl.contains('dynamicUrl') ||
trcl.contains('switch')
)
) {
rows[2].children[1].textContent = text;
} else {
@ -2333,10 +2337,12 @@ const popupManager = (function() {
}
outputAll.push(outputOne.join('|'));
}
outputAll.unshift(
`${' |'.repeat(fieldCount-1)} `,
`${':--- |'.repeat(fieldCount-1)}:--- `
);
if ( fieldCount !== 0 ) {
outputAll.unshift(
`${' |'.repeat(fieldCount-1)} `,
`${':--- |'.repeat(fieldCount-1)}:--- `
);
}
return `<details><summary>Logger output</summary>\n\n|${outputAll.join('|\n|')}|\n</details>\n`;
};
@ -2392,7 +2398,6 @@ const popupManager = (function() {
);
}
options[group] = value;
format();
};
const onOption = function(ev) {
@ -2421,6 +2426,7 @@ const popupManager = (function() {
group.getAttribute('data-radio'),
item.getAttribute('data-radio-item')
);
format();
ev.stopPropagation();
};
@ -2432,18 +2438,19 @@ const popupManager = (function() {
lines.length = 0;
}
);
setRadioButton('format', options.format);
setRadioButton('encoding', options.encoding);
collectLines();
format();
dialog.querySelector('.options').addEventListener(
'click',
onOption,
{ capture: true }
);
collectLines();
format();
modalDialog.show();
};