Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Multiple donate buttons on the same page breaks #302

Open
rahulgi opened this issue Jan 14, 2022 · 1 comment
Open

Multiple donate buttons on the same page breaks #302

rahulgi opened this issue Jan 14, 2022 · 1 comment

Comments

@rahulgi
Copy link
Member

rahulgi commented Jan 14, 2022

See https://everydotorg.slack.com/archives/C019X7TUTTL/p1642187463028400

Having a donate button and crypto button on the same page causes the first button to break, b/c the onload gets overridden by the second button.

Swapping onload = with addEventListener("load", createWidget) solves the issue, but I think it could it result in the initialization function being called many times if someone copy-pastes our code for buttons many times on the page. That being said, running the initialization code again doesn't seem to cause any problems, so maybe it's not an issue?

Would using different class names for the different donate buttons be a better option?

@malsmr
Copy link

malsmr commented Jan 7, 2024

Is this ready to be worked on?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants