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

data-url and data-title enhancements #141

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

epicfaace
Copy link

Define Share URL and text via data attributes, per issue #108

#### text :`String`

A string specifying text to share. The content of `<meta name="description">` or `<title>` (if first is missing) is used by default.

The text can also be specified by adding a value for the "data-url" attribute on the sharing element itself.
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I guess we want data-title here instead of data-url, right?

@@ -74,8 +74,8 @@
},

_initDefaults: function() {
this.url = window.location.href;
this.text = $.trim($("meta[name=description]").attr("content") || $("title").text());
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

could we keep defaulting to $("title").text() to avoid breaking changes?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please also keep in mind that twitter has a limit of 140 characters and that the description is actually a description which consists likely out of more then 140 characters.

@tabalinas
Copy link
Owner

@epicfaace, thank you for the contribution!
Could you please address a couple of comments?

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

Successfully merging this pull request may close these issues.

3 participants