jhinter / kleinanzeigen-pusher

1 stars 1 forks source link

Buttons don't show up due dom delay. #2

Open vin-ni opened 2 years ago

vin-ni commented 2 years ago

On my Computer, maybe due to add blockers, the dom needs some time to load on Kleinanzeigen. The Scripts run instantly, so most of the times the re-upload buttons don't show up.

I fixed it on my side by adding:

setTimeout(() => {
  injectRecreateButton();
}, 5000);

into offer-overview/index.js

It's just a quick fix. It would be better to trigger it when the dom is fully loaded, but this would probably need some rewriting of the manifest and script.

What do you think?

joronaud commented 9 months ago

Have you fixed it?

vin-ni commented 9 months ago

I was experimenting with alternative dom listeners in the manifest, but this didn't seem to work. For now I have my private branch that waits 5 seconds before running the plugin on the dom.

It's more a hack, so I didnt really want to PR. Any ideas?