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

Function initTabs

static/js/settings.js:154–166  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

152
153// 初始化标签页
154function initTabs() {
155 elements.tabs.forEach(btn => {
156 btn.addEventListener('click', () => {
157 const tab = btn.dataset.tab;
158
159 elements.tabs.forEach(b => b.classList.remove('active'));
160 elements.tabContents.forEach(c => c.classList.remove('active'));
161
162 btn.classList.add('active');
163 document.getElementById(`${tab}-tab`).classList.add('active');
164 });
165 });
166}
167
168// 事件监听
169function initEventListeners() {

Callers 1

settings.jsFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected