How do I force Tampermonkey to run/execute a script late after every document loaded by AJAX?
I wish to access those elements in my script and change them. But, even though I set @run-at
to document-end
in the setting page, it executes while the document wasn't loaded fully.
And, it happens at this specific website !!
I tried these ways but was unsuccessful:
- Onload event.
- I tried
while
statement to check if all documents were loaded and then continue executing my script but it crashed and fell into infinite loop. - I tried console to execute a function (but inaccessible by console).
So what do I do?