Yeldaai / chat-plugin

Yelda Chat Plugin
MIT License
0 stars 0 forks source link

assistant bubble text style and logic #103

Closed vishnu-ravi closed 2 years ago

vishnu-ravi commented 2 years ago

url listener implementation

vishnu-ravi commented 2 years ago

can you retest on side, especially the second use case, yelda assistant with some push notification ?

Fixed like if openChat was triggered every X seconds by a push notification on webchat repo

vishnu-ravi commented 2 years ago

Here is the recording of bubble text working https://user-images.githubusercontent.com/8384853/138051341-8b9314e9-a3ef-4ad0-974f-e0ff0f2ac753.mp4

meelie commented 2 years ago

i'll suggest to test this logic ?

var previousUrl = '';
var observer = new MutationObserver(function(mutations) {
  if (location.href !== previousUrl) {
      previousUrl = location.href;
      console.log(`URL changed to ${location.href}`);
    }
});

observer.observe();

When you're done observing, be sure to cancel the observer, using the variable from the previous example:

observer.disconnect();

vishnu-ravi commented 2 years ago

Sure I will test this now