How can I narrow the chatbot only in mobile versio...
# 🤝help
s
The bot is okay on the desktop version, but it is too wide on the mobile. I tried to modify the width under 330px, but it stays the same when I publish it. In preview mode, it narrowed it in desktop version
It would also be okay if it doesn't pop up the chat on mobile devices. I tried to implement and troubleshoot this code with ChatGPT, but I didn't get it to work: Document document.addEventListener("DOMContentLoaded", function() { // Check if the device is not a mobile device if (!(/Mobi|Android|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent))) { setTimeout(function() { window.botpressWebChat.sendEvent({ type: 'show' }); }, 5000); // 5000 milliseconds = 5 seconds } });
I really appreciate if someone can help and nudge me forward 😃
p
use media queries
s
Can you elaborate a bit?
@crooked-van-25152 can you help here?
c
@bright-magazine-792 could you please help here? Thank you
b
Hey @shy-air-17871 In your script, try changing the version from v1 to v0
Let us know how it goes!
c
Thank you Rohan 🙂
s
Thanks. Now that I have changed the link, it will pop up in the preview for the desktop and mobile versions. In the published view, the pop-up doesn't work at all.
I am not a coder so, this sould work, right? Can it be a website provider problem that is in this case liquidblox?
c
@bright-magazine-792 can you please help ? thanks
b
Can you DM me your code please? @shy-air-17871
That will help me in Debugging the issue
c
thanks @bright-magazine-792 ! Appreciate it
s
Thanks @bright-magazine-792, I sent it to you
@bright-magazine-792 have you had time to check this? If not can someone else take a look at this, thanks. @crooked-van-25152
@bright-magazine-792 FYI that I implemented another bot to customer website and this time the above code worked. What might be the problem in the first case?
b
hey @shy-air-17871 check your DM. I would require some information from you for solving this issue. thanks!
20 Views