refactor: clean up code structure in multiple files
This commit is contained in:
parent
3e85a88bd3
commit
99027e6315
4 changed files with 18 additions and 22 deletions
|
|
@ -218,13 +218,12 @@ function saveOptions(e) {
|
|||
case 'password':
|
||||
options[element.id] = element.value.trim();
|
||||
break;
|
||||
default:
|
||||
if (element.tagName === 'SELECT') {
|
||||
case 'select-one':
|
||||
options[element.id] = element.value;
|
||||
}else{
|
||||
break;
|
||||
default:
|
||||
console.error("[ThunderAI] Unhandled input type:", element.type);
|
||||
}
|
||||
}
|
||||
|
||||
browser.storage.sync.set(options);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -97,13 +97,12 @@ function saveOptions(e) {
|
|||
case 'password':
|
||||
options[element.id] = element.value.trim();
|
||||
break;
|
||||
default:
|
||||
if (element.tagName === 'SELECT') {
|
||||
case 'select-one':
|
||||
options[element.id] = element.value;
|
||||
}else{
|
||||
break;
|
||||
default:
|
||||
console.error("[ThunderAI] Unhandled input type:", element.type);
|
||||
}
|
||||
}
|
||||
|
||||
browser.storage.sync.set(options);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -97,13 +97,12 @@ function saveOptions(e) {
|
|||
case 'password':
|
||||
options[element.id] = element.value.trim();
|
||||
break;
|
||||
default:
|
||||
if (element.tagName === 'SELECT') {
|
||||
case 'select-one':
|
||||
options[element.id] = element.value;
|
||||
}else{
|
||||
break;
|
||||
default:
|
||||
console.error("[ThunderAI] Unhandled input type:", element.type);
|
||||
}
|
||||
}
|
||||
|
||||
browser.storage.sync.set(options);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -210,13 +210,12 @@ function saveOptions(e) {
|
|||
case 'password':
|
||||
options[element.id] = element.value.trim();
|
||||
break;
|
||||
default:
|
||||
if (element.tagName === 'SELECT') {
|
||||
case 'select-one':
|
||||
options[element.id] = element.value;
|
||||
}else{
|
||||
break;
|
||||
default:
|
||||
console.error("[ThunderAI] Unhandled input type:", element.type);
|
||||
}
|
||||
}
|
||||
|
||||
browser.storage.sync.set(options);
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue