MCPcopy Create free account
hub / github.com/Tron521/codex-console-temp / populateAutoRegistrationEmailServiceOptions

Function populateAutoRegistrationEmailServiceOptions

static/js/app.js:1111–1123  ·  view source on GitHub ↗
(selectedId = 0)

Source from the content-addressed store, hash-verified

1109}
1110
1111function populateAutoRegistrationEmailServiceOptions(selectedId = 0) {
1112 if (!elements.autoRegistrationEmailServiceId || !elements.autoRegistrationEmailServiceType) return;
1113 const selectedType = elements.autoRegistrationEmailServiceType.value || 'tempmail';
1114 const options = ['<option value="0">自动选择</option>'];
1115 const bucket = availableServices[selectedType];
1116 if (bucket && Array.isArray(bucket.services)) {
1117 bucket.services.forEach(service => {
1118 options.push(`<option value="${service.id}">${escapeHtml(service.name)} (#${service.id})</option>`);
1119 });
1120 }
1121 elements.autoRegistrationEmailServiceId.innerHTML = options.join('');
1122 elements.autoRegistrationEmailServiceId.value = String(selectedId || elements.autoRegistrationEmailServiceId.dataset.selectedId || 0);
1123}
1124
1125async function handleSaveAutoRegistration() {
1126 const autoCheckInterval = parseInt(elements.autoRegistrationCheckInterval.value, 10) || 60;

Callers 3

initEventListenersFunction · 0.85
loadAvailableServicesFunction · 0.85

Calls 1

escapeHtmlFunction · 0.70

Tested by

no test coverage detected