Files
librechat-custom/assets/custom.js

10 lines
438 B
JavaScript
Raw Permalink Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
// 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;
}
});