kytta / shareon

📯 Lightweight, stylish, and ethical share buttons for popular social networks
https://shareon.js.org/
MIT License
465 stars 25 forks source link

Is there any way to have dynamic links? #11

Closed yuriy-sng closed 4 years ago

yuriy-sng commented 4 years ago

Is there a way to re-run shareon after changing the data- attributes?

kytta commented 4 years ago

Like for example after changing the data-title? In moment there is no such possibility, but it's a nice idea to consider implementing. I'll update you on this towards the end of the week

kytta commented 4 years ago

This feature is now being implemented in #14

The only thing left for me to do is to update the docs; then the update will be live!

kytta commented 4 years ago

Released with v1.3.0 :tada: Check the "Initialization" section in the docs for more info!

onigetoc commented 4 years ago

How can we do that, Re-run shareon? Because on javascript url rewrite and title.

kytta commented 4 years ago

How can we do that, Re-run shareon?

@onigetoc just run shareon(). This function is being exposed to the DOM.

onigetoc commented 4 years ago

I used the no-init version and it work now.

kytta commented 4 years ago

I used the no-init version and it work now.

That's strange, it should work with the default (autoinit) version too.