0

I'm trying to write "greasemonkey" script to change some elements of gmail interface.

Specifically, the change I'm after is simple:

  Array.from(document.querySelectorAll('div')).find(el => el.textContent === 'Mail').parentElement.parentElement.remove();

If I run it from console in web browser, it works. But when i try from greasemonkey, nothing happens.

Checked (with script that does alert()) that the greasemonkey script are ran before the whole gmail interface is loaded.

Is there anything I can do in my script that will wait until the interface is there before running the removal?

chooboo
  • 51
  • 5

0 Answers0