Skip to content

Commit

Permalink
Merge pull request #11 from cathrin-will/tweet-url
Browse files Browse the repository at this point in the history
tweet url update
  • Loading branch information
dahliacreative committed Feb 20, 2018
2 parents 2a745bd + f7e0c4f commit 643e2f1
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions dist/sharetastic.js
Expand Up @@ -94,7 +94,7 @@ var Sharetastic = function () {
twitter: {
order: 2,
name: 'Twitter',
href: 'http://twitter.com/home?status=' + this.generateTitle() + this.generateUrl(' - '),
href: 'https://twitter.com/intent/tweet?text=' + this.generateTitle() + this.generateUrl(' - '),
icon: {
width: 32,
height: 32,
Expand Down Expand Up @@ -178,7 +178,7 @@ var Sharetastic = function () {
var exportOptions = $.extend(true, defaults, options);

if (this.element.hasAttribute('data-tweet')) {
exportOptions.services.twitter.href = 'http://twitter.com/home?status=' + encodeURIComponent(this.element.getAttribute('data-tweet'));
exportOptions.services.twitter.href = 'https://twitter.com/intent/tweet?text=' + encodeURIComponent(this.element.getAttribute('data-tweet'));
}

return exportOptions;
Expand Down
4 changes: 2 additions & 2 deletions lib/javascript/index.js
Expand Up @@ -76,7 +76,7 @@ class Sharetastic {
twitter: {
order: 2,
name: 'Twitter',
href: `http://twitter.com/home?status=${this.generateTitle()}${this.generateUrl(' - ')}`,
href: `https://twitter.com/intent/tweet?text=${this.generateTitle()}${this.generateUrl(' - ')}`,
icon: {
width: 32,
height: 32,
Expand Down Expand Up @@ -160,7 +160,7 @@ class Sharetastic {
const exportOptions = $.extend(true, defaults, options)

if (this.element.hasAttribute('data-tweet')) {
exportOptions.services.twitter.href = `http://twitter.com/home?status=${encodeURIComponent(this.element.getAttribute('data-tweet'))}`
exportOptions.services.twitter.href = `https://twitter.com/intent/tweet?text=${encodeURIComponent(this.element.getAttribute('data-tweet'))}`
}

return exportOptions
Expand Down
2 changes: 1 addition & 1 deletion package.json
@@ -1,6 +1,6 @@
{
"name": "sharetastic",
"version": "2.0.7",
"version": "2.0.8",
"description": "A simple jQuery social sharing plugin",
"main": "dist/sharetastic.js",
"style": "dist/sharetastic.sass",
Expand Down

0 comments on commit 643e2f1

Please sign in to comment.