diff --git a/js/dlg/config-dialog.js b/js/dlg/config-dialog.js index 945ba046..9e539301 100644 --- a/js/dlg/config-dialog.js +++ b/js/dlg/config-dialog.js @@ -255,10 +255,18 @@ async function configDialog(style) { case 'dropdown': case 'image': // TODO: a image picker input? - va.input = $create('select', {va, onchange: updateVarOnChange}, - va.options.map(o => $create('option', {value: o.name}, o.label))); - children = [$.fancySelect(va.input)]; - children[0].classList.add('config-value'); + children = [ + $create('.select-resizer.config-value', [ + va.input = $create('select', { + va, + onchange: updateVarOnChange, + }, + va.options.map(o => + $create('option', {value: o.name}, o.label))), + $create('SVG:svg.svg-icon.select-arrow', + $create('SVG:use', {'xlink:href': '#svg-icon-select-arrow'})), + ]), + ]; break; case 'range': diff --git a/js/dom.js b/js/dom.js index f83da6a6..77b19290 100644 --- a/js/dom.js +++ b/js/dom.js @@ -27,17 +27,6 @@ Object.assign(EventTarget.prototype, { $.root = document.documentElement; $.rootCL = $.root.classList; -$.dummies = { - select: $create('.select-resizer', - $create('SVG:svg.svg-icon.select-arrow', - $create('SVG:use', {'xlink:href': '#svg-icon-select-arrow'}))), -}; -$.fancySelect = el => { - const res = $.dummies.select.cloneNode(true); - if (el.parentNode) el.replaceWith(res); - res.prepend(el); - return res; -}; // Makes the focus outline appear on keyboard tabbing, but not on mouse clicks. const focusAccessibility = { diff --git a/js/localization.js b/js/localization.js index b99b972f..af020069 100644 --- a/js/localization.js +++ b/js/localization.js @@ -29,7 +29,7 @@ Object.assign(t, { ')', /(?!\b|\s|$)/, ].map(rx => rx.source || rx).join(''), 'gu'), - SELECTOR: '[i18n], template, select', + SELECTOR: '[i18n], template', HTML(html) { return typeof html !== 'string' @@ -49,9 +49,6 @@ Object.assign(t, { t.createTemplate(node); continue; } - if (node.localName === 'select' && (node.nextElementSibling || {}).localName !== 'svg') { - $.fancySelect(node); - } const attr = node.getAttribute('i18n'); if (!attr) continue; for (const part of attr.split(',')) { diff --git a/popup/search.html b/popup/search.html index 74cc597c..04c06d48 100644 --- a/popup/search.html +++ b/popup/search.html @@ -3,15 +3,28 @@