10 lines
438 B
JavaScript
10 lines
438 B
JavaScript
// Auto‑load saved image‑generation API key into the MCP input field.
|
||
// If the user has previously stored a key, it will be inserted; otherwise nothing is shown.
|
||
window.addEventListener('load', () => {
|
||
const storageKey = 'image_api_key';
|
||
const savedKey = localStorage.getItem(storageKey);
|
||
if (savedKey) {
|
||
const icInput = document.querySelector('input[name="IC_API_KEY"]');
|
||
if (icInput) icInput.value = savedKey;
|
||
}
|
||
}); |