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

Consider using the data-sharer attribute as the selector instead of class .sharer #58

Closed
soluml opened this issue Dec 7, 2017 · 1 comment

Comments

@soluml
Copy link

soluml commented Dec 7, 2017

Changing L27 from var elems = document.querySelectorAll('.sharer'), to var elems = document.querySelectorAll('[data-sharer]'), relieves users from having to add a sharer class to any element they want to act as a share button.

data-sharer is a required attribute for all social sharing anyway, so it can be used to kill two birds with one stone here.

@ellisonleao
Copy link
Owner

nice idea @soluml ! Will check it soon. Thanks for the tip

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