From 6a216a51aff3f0c49e13cf256a11faaf0604441f Mon Sep 17 00:00:00 2001 From: Jonathan Kamens Date: Mon, 2 Sep 2024 16:22:44 -0400 Subject: [PATCH] Hide the detached popup preference when it doesn't do anything On releases of TB before TB128, don't show the detached popup preference in the preferences window. --- ui/options.html | 10 ++++++---- ui/options.js | 9 +++++++-- 2 files changed, 13 insertions(+), 6 deletions(-) diff --git a/ui/options.html b/ui/options.html index 055372cb..699103ef 100644 --- a/ui/options.html +++ b/ui/options.html @@ -193,10 +193,12 @@ __MSG_SubfolderPreference__ - +
+ +
diff --git a/ui/options.js b/ui/options.js index ea1fa72f..d8b187c0 100644 --- a/ui/options.js +++ b/ui/options.js @@ -347,8 +347,9 @@ const SLOptions = { funcSelectors[`ufunc-accel-ctrl-${funcName}`] = "accelCtrlfuncselect"; funcSelectors[`ufunc-accel-shift-${funcName}`] = "accelShiftfuncselect"; for (let i = 1; i < 4; i++) - funcSelectors[`ufunc-shortcut-${i}-${funcName}`] = - `quickOptions${i}funcselect`; + funcSelectors[ + `ufunc-shortcut-${i}-${funcName}` + ] = `quickOptions${i}funcselect`; for (let key of Object.keys(funcSelectors)) { if (document.getElementById(key)) continue; @@ -1048,6 +1049,10 @@ const SLOptions = { document.getElementById("showColumnRow").hidden = true; }); + await SLStatic.tb128(false, () => { + document.getElementById("detachedPopupDiv").hidden = true; + }); + await SLOptions.applyPrefsToUI(); await SLOptions.attachListeners();