From 8522a28a7dc52594cb8514b0f822de7d4abbadc3 Mon Sep 17 00:00:00 2001 From: Mic Date: Thu, 16 Apr 2026 22:11:40 +0200 Subject: [PATCH] no more menu items alphabetical order. see #680 --- popup/mzta-popup.js | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/popup/mzta-popup.js b/popup/mzta-popup.js index 4a56f41c..a8e1bee1 100644 --- a/popup/mzta-popup.js +++ b/popup/mzta-popup.js @@ -82,15 +82,9 @@ document.addEventListener('DOMContentLoaded', async () => { async function searchPrompt(allPrompts, tabId, tabType, filtering){ taLog.log("tabType: " + tabType); - let prefs_order = await browser.storage.sync.get({dynamic_menu_order_alphabet: true}); - - if(prefs_order.dynamic_menu_order_alphabet){ - allPrompts.sort((a, b) => a.label.localeCompare(b.label)); - } else { - // Sort by position: use position_display for reading (filtering=1), position_compose for composing (filtering=2) - const posKey = filtering === 2 ? 'position_compose' : 'position_display'; - allPrompts.sort((a, b) => (a[posKey] || 9999) - (b[posKey] || 9999)); - } + // Sort by position: use position_display for reading (filtering=1), position_compose for composing (filtering=2) + const posKey = filtering === 2 ? 'position_compose' : 'position_display'; + allPrompts.sort((a, b) => (a[posKey] || 9999) - (b[posKey] || 9999)); // console.log(">>>>>>>>> allPrompts: " + JSON.stringify(allPrompts));