removed duplicated getChatGPTWebModelsList_HTML function

This commit is contained in:
mic 2025-05-01 23:37:32 +02:00
parent 59ae3643a5
commit dfe1c5c8a4

View file

@ -322,48 +322,6 @@ async function disable_GetCalendarEvent(){
}
function getChatGPTWebModelsList_HTML(values, targetRowId) {
const rowElement = document.getElementById(targetRowId);
if (!rowElement) return;
// Clears any existing td elements
rowElement.innerHTML = '';
// First TD: label
const labelTd = document.createElement('td');
const label = document.createElement('i');
label.className = 'small_info';
const labelNobr = document.createElement('nobr');
labelNobr.textContent = browser.i18n.getMessage("AllowedValues") + ":";
label.appendChild(labelNobr);
labelTd.appendChild(label);
// Second TD: values
const valuesTd = document.createElement('td');
const valuesContainer = document.createElement('i');
valuesContainer.className = 'small_info';
values.forEach(value => {
const nbspBefore = document.createTextNode(' \u00A0 '); // "   "
const valueNobr = document.createElement('nobr');
valueNobr.className = 'conntype_chatgpt_web_option';
valueNobr.textContent = value;
const nbspAfter = document.createTextNode(' \u00A0 ');
valuesContainer.appendChild(nbspBefore);
valuesContainer.appendChild(valueNobr);
valuesContainer.appendChild(nbspAfter);
});
valuesTd.appendChild(valuesContainer);
// Adds the td elements to the row
rowElement.appendChild(labelTd);
rowElement.appendChild(valuesTd);
}
function getChatGPTWebModelsList_HTML(values, targetRowId) {
const rowElement = document.getElementById(targetRowId);
if (!rowElement) return;