Skip to content

Commit

Permalink
Release v0.2.2
Browse files Browse the repository at this point in the history
  • Loading branch information
jamesjwarren committed Mar 4, 2016
1 parent c4446cc commit f87046e
Show file tree
Hide file tree
Showing 5 changed files with 20 additions and 5 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
@@ -1,3 +1,7 @@
## Changes in 0.2.2

* @jamesjwarren: Fix: set share default title and description from document (#17)

## Changes in 0.2.1

* @jamesjwarren: Fix: get share url from $location service (#14)
Expand Down
2 changes: 1 addition & 1 deletion bower.json
@@ -1,7 +1,7 @@
{
"name": "angular-addthis",
"description": "Addthis toolbox directive, Re-renders addthis buttons as ngRoute changes views in our app since the addthis buttons only load by default on page load and not when the DOM is updated.",
"version": "0.2.1",
"version": "0.2.2",
"homepage": "https://github.com/thisissoon/angular-addthis",
"license": "MIT",
"main": "dist/angular-addthis.js",
Expand Down
13 changes: 12 additions & 1 deletion dist/angular-addthis.js
@@ -1,4 +1,4 @@
/*! angular-addthis - v0.2.1 - 2016-02-05 */
/*! angular-addthis - v0.2.2 - 2016-03-04 */
"use strict";
/**
* AddThis widget directive, Re-renders addthis buttons as angular changes
Expand Down Expand Up @@ -107,6 +107,17 @@ angular.module("sn.addthis", [])
}
}

// Default share title from page title
if (!$scope.share.title) {
var titleElement = $document[0].querySelector("title");
$scope.share.title = titleElement ? titleElement.innerHTML : "";
}
// Default share description from page title
if (!$scope.share.description) {
var descElement = $document[0].querySelector("meta[name='description']");
$scope.share.description = descElement ? descElement.getAttribute("content") : "";
}

$window.addthis.init();

if ($window.addthis.layers && $window.addthis.layers.refresh) {
Expand Down
4 changes: 2 additions & 2 deletions dist/angular-addthis.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
@@ -1,7 +1,7 @@
{
"name": "angular-addthis",
"private": false,
"version": "0.2.1",
"version": "0.2.2",
"description": "Addthis toolbox directive, Re-renders addthis buttons as ngRoute changes views in our app since the addthis buttons only load by default on page load and not when the DOM is updated.",
"repository": "https://github.com/thisissoon/angular-utils",
"license": "MIT",
Expand Down

0 comments on commit f87046e

Please sign in to comment.