Skip to content

Commit

Permalink
Merge branch 'release/2.1.2'
Browse files Browse the repository at this point in the history
  • Loading branch information
compeak committed Jan 26, 2018
2 parents 3f20538 + 1b5196c commit e46f20a
Show file tree
Hide file tree
Showing 5 changed files with 18 additions and 4 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
# Changelog

## v2.1.2, 2018-01-26

- Fixed SEO friendliness by adding `rel="nofollow"` to all button links. (richard67)
- Fixed Telegram service not opening in a popup.

## v2.1.1, 2018-01-03

- Fixed missing `dist` directory.
Expand Down
2 changes: 1 addition & 1 deletion RELEASING.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
To prepare a release you have to do the following tasks:

1. Run `git flow release start [version]`.
2. Bump versions in `package.json` and `bower.json`.
2. Bump versions in `package.json`.
3. Update [CHANGELOG.md](CHANGELOG.md).
2. Run `git flow release finish`.

Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "shariff",
"version": "2.1.1",
"version": "2.1.2",
"description": "Shariff enables website users to share their favorite content without compromising their privacy.",
"main": "src/js/shariff.js",
"scripts": {
Expand Down
2 changes: 1 addition & 1 deletion src/js/services/telegram.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ module.exports = function(shariff) {
var url = encodeURIComponent(shariff.getURL())

return {
popup: false,
popup: true,
shareText: {
'bg': 'cподеляне',
'da': 'del',
Expand Down
11 changes: 10 additions & 1 deletion src/js/shariff.js
Original file line number Diff line number Diff line change
Expand Up @@ -210,9 +210,18 @@ class Shariff {

if (service.popup) {
$shareLink.attr('data-rel', 'popup')
if (service.name !== 'info') {
$shareLink.attr('rel', 'nofollow')
}
} else if (service.blank) {
$shareLink.attr('target', '_blank')
$shareLink.attr('rel', 'noopener noreferrer')
if (service.name === 'info') {
$shareLink.attr('rel', 'noopener noreferrer')
} else {
$shareLink.attr('rel', 'nofollow noopener noreferrer')
}
} else if (service.name !== 'info') {
$shareLink.attr('rel', 'nofollow')
}
$shareLink.attr('title', this.getLocalized(service, 'title'))

Expand Down

0 comments on commit e46f20a

Please sign in to comment.