fix ask-AI
This commit is contained in:
@@ -186,12 +186,7 @@ function updateAskAIButton() {
|
|||||||
const button = document.getElementById('askAiButton');
|
const button = document.getElementById('askAiButton');
|
||||||
if (!button) return;
|
if (!button) return;
|
||||||
|
|
||||||
const iconSpan = button.querySelector('.ai-icon');
|
// Only update text, never modify the icon
|
||||||
|
|
||||||
if (aiProfileData && aiProfileData.avatar && iconSpan) {
|
|
||||||
iconSpan.innerHTML = `<img src="${aiProfileData.avatar}" alt="${aiProfileData.displayName || 'AI'}" class="ai-avatar-small">`;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (aiProfileData && aiProfileData.displayName) {
|
if (aiProfileData && aiProfileData.displayName) {
|
||||||
const textNode = button.childNodes[2] || button.lastChild;
|
const textNode = button.childNodes[2] || button.lastChild;
|
||||||
if (textNode && textNode.nodeType === Node.TEXT_NODE) {
|
if (textNode && textNode.nodeType === Node.TEXT_NODE) {
|
||||||
|
Reference in New Issue
Block a user