Rebrand via Tailwind theme vars; hide signup prompt via :has() + observer; sync yaml with volume fix
This commit is contained in:
1 parent
a4855aba2f
commit
03e6baf3df
4 files changed
+76
-100
No files matched your search
+27
-15
@@ -1,16 +1,28 @@
|
||||
// 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;
|
||||
// Co-op login-page polish.
|
||||
// The auth form is client-rendered (React), so a plain `load` listener runs
|
||||
// too early — a MutationObserver re-checks on every DOM change instead.
|
||||
(function () {
|
||||
function hideSignupPrompt() {
|
||||
document.querySelectorAll('p').forEach(function (p) {
|
||||
var link = p.querySelector('a[href*="register"]');
|
||||
var text = (p.textContent || '');
|
||||
if (link || text.indexOf("Don't have an account") !== -1) {
|
||||
p.style.display = 'none';
|
||||
}
|
||||
});
|
||||
}
|
||||
// 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';
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
function start() {
|
||||
hideSignupPrompt();
|
||||
new MutationObserver(hideSignupPrompt).observe(document.body, {
|
||||
childList: true,
|
||||
subtree: true,
|
||||
});
|
||||
}
|
||||
|
||||
if (document.readyState === 'loading') {
|
||||
document.addEventListener('DOMContentLoaded', start);
|
||||
} else {
|
||||
start();
|
||||
}
|
||||
})();
|
||||
Reference in new issue
Block a user