Files
librechat-custom/assets/custom2.js
T

16 lines
663 B
JavaScript
Raw 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.
// No prompt is shown; if a key is stored in localStorage it is auto‑filled.
window.addEventListener('load', () => {
const savedKey = localStorage.getItem('image_api_key');
if (savedKey) {
const icInput = document.querySelector('input[name=\"IC_API_KEY\"]');
if (icInput) icInput.value = savedKey;
}
// Hide "Don't have an account?" text on the login page
const nodes = document.querySelectorAll('p, span, div');
nodes.forEach(node => {
if (node.textContent && node.textContent.includes("Don't have an account")) {
node.style.display = 'none';
}
});
});