# đź› technical-support
B
blooAI·19 replies

Hello do anybody knows how I can use CSS to display the icon of a chat and avoid to have suv an url https://content.yourgpt.ai/chatbots/ when using branding module? I would like to avoid my client to see yourGPT, can any body help ?

Sahil
Sahil29/01/2025 16:33

hello @blooAI
Can you specify which icon you are referring to?

B
blooAI29/01/2025 16:58

I have a brading module, but the logo as title in the chat use your url.

B
blooAI29/01/2025 16:58

Rohit told me in my call that it can be solved with CSS.

Sahil
Sahil30/01/2025 07:07

We can achieve this using JavaScript injection by replacing the image URL. Could you share the image link that needs to be replaced? I’ll provide the necessary code for it that you can add.

B
blooAI30/01/2025 07:25

Here is the link of my 2 chats with link:

ChatBot Pharma-Vrai 81738999-f5fc-45f7-858a-7ce5c768e15d https://bloocards.b-cdn.net/-chat_images/pharma-vrai.webp

ChatBot NOVE /72c72dc1-2a53-4a6f-a0ca-8c13b8b4c6c8 https://bloocards.b-cdn.net/-chat_images/nove.jpg

Sahil
Sahil30/01/2025 14:17

hello @blooAI

Here’s a snippet you can use to replace avatars using the Branding JS injection. You can update the image URL as needed.

    function replaceImages() {
        console.log("DDD1");
        document.querySelectorAll("img.ygc-bot-pic").forEach(img => {
            console.log("Replacing image:", img.src);
            img.src = "https://bloocards.b-cdn.net/-chat_images/pharma-vrai.webp"; // Replace with your new URL
        });
    }

    document.addEventListener("DOMContentLoaded", replaceImages);
    replaceImages();
})();```
B
blooAI30/01/2025 16:13
edited

Hello I have realized that the icon in the CHAT is still with your cdn, can you extend the javascript for both images ?

Sahil
Sahil30/01/2025 16:52

Can you provide your widget link? I think the above code should replace all the links.

B
blooAI30/01/2025 16:57

But I will need the javascript for 2 chatbots, second is https://ai.bloo.cards/72c72dc1-2a53-4a6f-a0ca-8c13b8b4c6c8

Sahil
Sahil30/01/2025 17:04

you can update to this script to fix it

    function replaceImages() {
        document.querySelectorAll("img.ygc-bot-pic").forEach(img => {
            if (img.src !== "https://bloocards.b-cdn.net/-chat_images/pharma-vrai.webp") {
                console.log("Replacing image:", img.src);
                img.src = "https://bloocards.b-cdn.net/-chat_images/pharma-vrai.webp"; // Replace with your new URL
            }
        });
    }

    // Run initially
    document.addEventListener("DOMContentLoaded", replaceImages);
    replaceImages();

    // Set up MutationObserver to watch for new elements
    const observer = new MutationObserver(replaceImages);
    const parentDiv = document.getElementById("yourgpt_root"); // Replace with actual ID

    if (parentDiv) {
        observer.observe(parentDiv, { childList: true, subtree: true });
    } else {
        console.warn("Parent div not found!");
    }
})();```

and for the other bot you can use the script just change your logo url
B
blooAI30/01/2025 17:58

Thank you !

B
blooAI01/02/2025 10:35

Hello, my widget https://ai.bloo.cards/81738999-f5fc-45f7-858a-7ce5c768e15d Do not show the content, page stay white, can you help me ?

Sahil
Sahil01/02/2025 10:42

hello @blooAI
Can you refresh the page and check again now?

B
blooAI01/02/2025 12:29

Chat came back, can you explain me what happens ? Did you relaunch something in term of data, for 10 min answers where not good and now good again.

Sahil
Sahil01/02/2025 13:02
edited

It looks like you changed the widget’s color settings and surface color. The issue was caused by extra spaces in the color codes resulting in invalid color code, which led to the widget crashing. We’ve now handled this case to prevent future crashes.

B
blooAI06/02/2025 10:21

Hello, every morning, I see that my first request does not show the images, but I can see them in the chungs, can you check why, it appears only after 2 or 3 request (insisting) - widget : https://ai.bloo.cards/81738999-f5fc-45f7-858a-7ce5c768e15d

Sahil
Sahil06/02/2025 11:08

It looks like your training data contains some broken links. One of the links generated by the AI appears to be invalid, along with a few others. You can check these training data and fix these.

https://content.app-sources.com/s/472591435565432411/uploads/Pharma_Vrai/Motidigest-7204038.jpg