diff --git a/edit/edit.js b/edit/edit.js index 39de46bb..073db22f 100644 --- a/edit/edit.js +++ b/edit/edit.js @@ -1643,19 +1643,27 @@ function toMozillaFormat() { } function fromMozillaFormat() { - const popup = showCodeMirrorPopup(t('styleFromMozillaFormatPrompt'), tHTML(`
- - -
` - )); + const popup = showCodeMirrorPopup(t('styleFromMozillaFormatPrompt'), + $element({appendChild: [ + $element({ + tag: 'button', + name: 'import-append', + textContent: t('importAppendLabel'), + title: t('importAppendTooltip'), + onclick: doImport, + }), + $element({ + tag: 'button', + name: 'import-replace', + textContent: t('importReplaceLabel'), + title: t('importReplaceTooltip'), + onclick: doImport, + }), + ]})); const contents = $('.contents', popup); contents.insertBefore(popup.codebox.display.wrapper, contents.firstElementChild); popup.codebox.focus(); - - $('[name="import-append"]', popup).addEventListener('click', doImport); - $('[name="import-replace"]', popup).addEventListener('click', doImport); - popup.codebox.on('change', () => { clearTimeout(popup.mozillaTimeout); popup.mozillaTimeout = setTimeout(() => {