String Injection in Twitter's inputfield with Chrome extension

214 views Asked by At

I am trying to build a Chrome extension that generates texts on Twitter. I am struggling with injecting the text in the inputfield.

Here is how I do it:

  • If the user has already input some content, it works great
  • If the user has not already input content, I have to slightly change the HTML (remove the default <br> and add a <span>)

However, on the second use case, it just doesn't work. The placeholder stays visible and the inputfied is broken.

See it in action: => https://www.loom.com/share/4bac993ba2cd4ee4a38fc209e751e323

(images if you don't want to check the video) enter image description here

enter image description here

Am I missing something? Is there some kind of JS variable on change in addition to changes in the HTML?

Thanks

0

There are 0 answers