Skip to content

Commit

Permalink
Merge branch 'release/2.1.3'
Browse files Browse the repository at this point in the history
  • Loading branch information
compeak committed Feb 23, 2018
2 parents e46f20a + 495a405 commit 25c90e8
Show file tree
Hide file tree
Showing 27 changed files with 314 additions and 28 deletions.
22 changes: 16 additions & 6 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,15 @@
# Changelog

## v2.1.3, 2018-02-23

- Added czech translations. (mat-hew1)
- Removed G+ counter from documentation and demo. (richard67)
- Fixed handling of `data-mail-subject`. (richard67)
- Fixed crashes occuring if HTML document is missing a valid `<title>` tag. (richard67)
- Fixed typo in documentation. (cedricziel)
- Improved distinguishability of reddit icon. (richard67)
- Improved translations and translation documentation. (richard67)

## v2.1.2, 2018-01-26

- Fixed SEO friendliness by adding `rel="nofollow"` to all button links. (richard67)
Expand Down Expand Up @@ -64,7 +74,7 @@ This release contains breaking changes:

## 1.25.2 2017-06-13

* Restored the jQuery dependency for the min.js version. (liayn)
* Restored the jQuery dependency for the `min.js` version. (liayn)
* Added Kirby third party integration. (AndiLeni)
* Added support for DOM-ready functions. (glaszig)
* Updated dependencies. (liayn)
Expand Down Expand Up @@ -121,7 +131,7 @@ This release contains breaking changes:
* Added Threema service. (medienverbinder)
* Added StumbleUpon service. (craiq)
* Added Reddit service. (craiq)
* Changed rel=popup to data-rel.
* Changed `rel=popup` to `data-rel`.

## v1.20.0 2015-10-22

Expand Down Expand Up @@ -151,7 +161,7 @@ This release contains breaking changes:
## v1.16.0 2015-07-13

* Made license SPDX compatible.
* Updated grunt-connect-proxy dependency. (medienverbinder)
* Updated `grunt-connect-proxy` dependency. (medienverbinder)

## v1.15.0 2015-06-30

Expand Down Expand Up @@ -187,11 +197,11 @@ This release contains breaking changes:

## v1.10.0 2015-04-15
* Added xing service. (osahner)
* Fixed mailto links opening in new tabs.
* Fixed `mailto` links opening in new tabs.
* Updated node dependencies.

## v1.9.3 2015-04-08
* Added missing shariff.min.css in release.
* Added missing `shariff.min.css` in release.

## v1.9.2 2015-04-08
* Made sure shariff element does not have any children on initialization.
Expand All @@ -212,7 +222,7 @@ This release contains breaking changes:
* Fixed bug in service popups where popups did not open in IE. (doerler)

## v1.7.3 2015-02-14
* Fixed shariff-complete.css to use font-awesome CDN.
* Fixed `shariff-complete.css` to use font-awesome CDN.

## v1.7.1 2015-02-05
* Fixed bug twitter via detection.
Expand Down
8 changes: 3 additions & 5 deletions README-de.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ Der Code der offiziellen Buttons von Facebook, Google+ und Twitter überträgt v

Shariff `(/ˈʃɛɹɪf/)` ist ein Open-Source Projekt von c't und heise online.

Shariff besteht aus zwei Teilen. Der erste Teil ist eine einfache JavaScript-Bibliothek einschließlich Vektor-Icons und CSS zur Formatierung der Knöpfe. Der zweite ist die optionale, server-seitige Komponente (derzeit für PHP, Perl oder NodeJS). Mit dem Shariff-Backend auf dem eigenen Server muss der Browser des Besuchers zur Darstellung der Share-Counts keine Verbindung zu Facebook oder Google+ aufbauen. Daten werden erst dann zum Social-Media-Netzwerk übertragen, wenn der Besucher den Inhalt tatsächlich teilen möchte.
Shariff besteht aus zwei Teilen. Der erste Teil ist eine einfache JavaScript-Bibliothek einschließlich Vektor-Icons und CSS zur Formatierung der Knöpfe. Der zweite ist die optionale, server-seitige Komponente (derzeit für PHP, Perl oder NodeJS). Mit dem Shariff-Backend auf dem eigenen Server muss der Browser des Besuchers zur Darstellung der Share-Counts keine Verbindung zu den Social-Media-Netzwerken aufbauen. Daten werden erst dann übertragen, wenn der Besucher den Inhalt tatsächlich teilen möchte.

## Erste Schritte

Expand Down Expand Up @@ -89,7 +89,7 @@ $ npm run dev
| `data-flattr-user` | Benutzer, der die Flattr-Spende erhält. | `null` |
| `data-info-url` | URL der Infoseite. | `http://ct.de/-2467514` |
| `data-info-display` | Wie die Infoseite angezeigt wird. Werte: `blank`, `popup`, `self`. | `blank` |
| `data-lang` | Lokalisierung auswählen. Verfügbar: `bg`, `de`, `en`, `es`, `fi`, `hr`, `hu`, `ja`, `ko`, `no`, `pl`, `pt`, `ro`, `ru`, `sk`, `sl`, `sr`, `sv`, `tr`, `zh` | `de` |
| `data-lang` | Lokalisierung auswählen. Verfügbar: `bg`, `cs`, `da`, `de`, `en`, `es`, `fi`, `fr`, `hr`, `hu`, `it`, `ja`, `ko`, `nl`, `no`, `pl`, `pt`, `ro`, `ru`, `sk`, `sl`, `sr`, `sv`, `tr`, `zh` | `de` |
| `data-mail-body` | Wenn `data-mail-url` ein `mailto:`-Link ist, wird dieser Wert als Mail-Body verwendet. Der Mail-Body-Text sollte den Platzhalter `{url}` enthalten. Dieser wird durch die zu teilende URL ersetzt. | siehe `data-url` |
| `data-mail-subject` | Wenn `data-mail-url` ein `mailto:`-Link ist, wird dieser Wert als Mail-Betreff verwendet. | siehe `data-title` |
| `data-mail-url` | Der Link des `mail`-Buttons | `?view=mail` |
Expand Down Expand Up @@ -157,10 +157,8 @@ Die URL dieser Seite kann mit einer Option festgelegt werden. Standardwert: `htt

## Backends

Wenn in den Shariff-Buttons die Share-Counts angezeigt werden sollen, wird eines der folgenden Backends benötigt:
Wenn in den Shariff-Buttons die Share-Counts angezeigt werden sollen, wird das folgende Backend benötigt:

* [shariff-backend-node](http://github.com/heiseonline/shariff-backend-node)
* [shariff-backend-perl](http://github.com/heiseonline/shariff-backend-perl)
* [shariff-backend-php](http://github.com/heiseonline/shariff-backend-php)

Drittanbieter-Backends:
Expand Down
11 changes: 5 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ Facebook, Google+ and Twitter supply official sharing code snippets which quietl

Shariff `(/ˈʃɛɹɪf/)` is an open-source, low-maintenance, high-privacy solution maintained by German computer magazine c't and heise online.

Shariff consists of two parts: a simple JavaScript client library and an optional server-side component. The latter fetches the number of likes and plus-ones. Share buttons and share counts work without a connection between your visitors' browsers and *social networks* (unless they decide to share, of course).
Shariff consists of two parts: a simple JavaScript client library and an optional server-side component. The latter fetches the number of likes or shares. Share buttons and share counts work without a connection between your visitors' browsers and *social networks* (unless they decide to share, of course).

## Getting Started

Expand Down Expand Up @@ -85,12 +85,12 @@ $ npm run dev

| Attribute | Description | Default |
|------------------|-------------|---------|
| `data-backend-url` | The path to your Shariff backend, see below. Settings the value to `null` disables the backend feature. No counts will occur. | `null` |
| `data-backend-url` | The path to your Shariff backend, see below. Setting the value to `null` disables the backend feature. No counts will occur. | `null` |
| `data-flattr-category` | Category to be used for Flattr. | `null` |
| `data-flattr-user` | User that receives Flattr donation. | `null` |
| `data-info-url` | URL of the info page. | `http://ct.de/-2467514` |
| `data-info-display` | How to display the info page. Values: `blank`, `popup`, `self`. | `blank` |
| `data-lang` | The localisation to use. Available: `bg`, `de`, `en`, `es`, `fi`, `hr`, `hu`, `ja`, `ko`, `no`, `pl`, `pt`, `ro`, `ru`, `sk`, `sl`, `sr`, `sv`, `tr`, `zh` | `de` |
| `data-lang` | The localisation to use. Available: `bg`, `cs`, `da`, `de`, `en`, `es`, `fi`, `fr`, `hr`, `hu`, `it`, `ja`, `ko`, `nl`, `no`, `pl`, `pt`, `ro`, `ru`, `sk`, `sl`, `sr`, `sv`, `tr`, `zh` | `de` |
| `data-mail-body` | If a `mailto:` link is used in `data-mail-url`, then this value is used as the mail body. The body text should contain the placeholder `{url}` which will be replaced with the share URL. | see `data-url` |
| `data-mail-subject` | If a `mailto:` link is used in `data-mail-url`, then this value is used as the mail subject. | see `data-title` |
| `data-mail-url` | The url target used for the `mail` service button | `?view=mail` |
Expand Down Expand Up @@ -159,13 +159,12 @@ The URL of this page can be set with an option. Default value: `http://ct.de/-24

## Backends

In order to display share counts with Shariff, you need one of the following backends:
In order to display share counts with Shariff, you need the following backend:

* [shariff-backend-node](http://github.com/heiseonline/shariff-backend-node)
* [shariff-backend-perl](http://github.com/heiseonline/shariff-backend-perl)
* [shariff-backend-php](http://github.com/heiseonline/shariff-backend-php)

Third-party backends:

* [shariff-backend-java](http://github.com/headissue/shariff-backend-java)

Once you have one of these backends up and running, insert its URL into the `data-backend-url` attribute. For example, if the backend runs under `http://example.com/my-shariff-backend/`, the `data-backend-url` should be `/my-shariff-backend/`. The script will handle the rest.
Expand Down
2 changes: 1 addition & 1 deletion demo/backend.json
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{"facebook":0,"googleplus":3387,"linkedin":92,"reddit":12,"stumbleupon":4325,"xing":185}
{"facebook":906,"linkedin":92,"reddit":12,"stumbleupon":4325,"vk":57,"xing":185}
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.2",
"version": "2.1.3",
"description": "Shariff enables website users to share their favorite content without compromising their privacy.",
"main": "src/js/shariff.js",
"scripts": {
Expand Down
2 changes: 2 additions & 0 deletions src/js/services/addthis.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ module.exports = function(shariff) {
popup: true,
shareText: {
'bg': 'cподеляне',
'cs': 'sdílet',
'da': 'del',
'de': 'teilen',
'en': 'share',
Expand Down Expand Up @@ -34,6 +35,7 @@ module.exports = function(shariff) {
faName: 'fa-plus',
title: {
'bg': 'Сподели в AddThis',
'cs': 'Sdílet na AddThis',
'da': 'Del på AddThis',
'de': 'Bei AddThis teilen',
'en': 'Share on AddThis',
Expand Down
44 changes: 44 additions & 0 deletions src/js/services/diaspora.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,15 +12,59 @@ module.exports = function(shariff) {
return {
popup: true,
shareText: {
'bg': 'cподеляне',
'cs': 'sdílet',
'da': 'del',
'de': 'teilen',
'en': 'share',
'es': 'compartir',
'fi': 'Jaa',
'fr': 'partager',
'hr': 'podijelite',
'hu': 'megosztás',
'it': 'condividi',
'ja': '共有',
'ko': '공유하기',
'nl': 'delen',
'no': 'del',
'pl': 'udostępnij',
'pt': 'compartilhar',
'ro': 'partajează',
'ru': 'поделиться',
'sk': 'zdieľať',
'sl': 'deli',
'sr': 'podeli',
'sv': 'dela',
'tr': 'paylaş',
'zh': '分享'
},
name: 'diaspora',
faName: 'fa-asterisk',
title: {
'bg': 'Сподели в Diaspora',
'cs': 'Sdílet na Diaspora',
'da': 'Del på Diaspora',
'de': 'Bei Diaspora teilen',
'en': 'Share on Diaspora',
'es': 'Compartir en Diaspora',
'fi': 'Jaa Diasporaissä',
'fr': 'Partager sur Diaspora',
'hr': 'Podijelite na Diaspora',
'hu': 'Megosztás Diaspora',
'it': 'Condividi su Diaspora',
'ja': 'Diaspora上で共有',
'ko': 'Diaspora에서 공유하기',
'nl': 'Delen op Diaspora',
'no': 'Del på Diaspora',
'pl': 'Udostępnij przez Diaspora',
'pt': 'Compartilhar no Diaspora',
'ro': 'Partajează pe Diaspora',
'ru': 'Поделиться на Diaspora',
'sk': 'Zdieľať na Diaspora',
'sl': 'Deli na Diaspora',
'sr': 'Podeli na Diaspora-u',
'sv': 'Dela på Diaspora',
'tr': 'Diaspora\'ta paylaş',
'zh': '分享至Diaspora'
},
shareUrl: url.format(shareUrl) + shariff.getReferrerTrack()
Expand Down
2 changes: 2 additions & 0 deletions src/js/services/facebook.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ module.exports = function(shariff) {
popup: true,
shareText: {
'bg': 'cподеляне',
'cs': 'sdílet',
'da': 'del',
'de': 'teilen',
'en': 'share',
Expand Down Expand Up @@ -34,6 +35,7 @@ module.exports = function(shariff) {
faName: 'fa-facebook',
title: {
'bg': 'Сподели във Facebook',
'cs': 'Sdílet na Facebooku',
'da': 'Del på Facebook',
'de': 'Bei Facebook teilen',
'en': 'Share on Facebook',
Expand Down
2 changes: 2 additions & 0 deletions src/js/services/googleplus.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ module.exports = function(shariff) {
popup: true,
shareText: {
'bg': 'cподеляне',
'cs': 'sdílet',
'da': 'del',
'de': 'teilen',
'en': 'share',
Expand Down Expand Up @@ -34,6 +35,7 @@ module.exports = function(shariff) {
faName: 'fa-google-plus',
title: {
'bg': 'Сподели в Google+',
'cs': 'Sdílet na Google+',
'da': 'Del på Google+',
'de': 'Bei Google+ teilen',
'en': 'Share on Google+',
Expand Down
1 change: 1 addition & 0 deletions src/js/services/info.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ module.exports = function(shariff) {
faName: 'fa-info',
title: {
'bg': 'Повече информация',
'cs': 'Více informací',
'da': 'Flere oplysninger',
'de': 'Weitere Informationen',
'en': 'More information',
Expand Down
4 changes: 4 additions & 0 deletions src/js/services/linkedin.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@ module.exports = function(shariff) {
return {
popup: true,
shareText: {
'bg': 'cподеляне',
'cs': 'sdílet',
'da': 'del',
'de': 'mitteilen',
'en': 'share',
'es': 'compartir',
Expand Down Expand Up @@ -34,6 +37,7 @@ module.exports = function(shariff) {
faName: 'fa-linkedin',
title: {
'bg': 'Сподели в LinkedIn',
'cs': 'Sdílet na LinkedIn',
'da': 'Del på LinkedIn',
'de': 'Bei LinkedIn teilen',
'en': 'Share on LinkedIn',
Expand Down
3 changes: 2 additions & 1 deletion src/js/services/mail.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ module.exports = function(shariff) {

// mailto: link? Add body and subject.
if (url.indexOf('mailto:') === 0) {
url += '?subject=' + encodeURIComponent(shariff.getTitle())
url += '?subject=' + encodeURIComponent(shariff.getOption('mailSubject') || shariff.getTitle())
url += '&body=' + encodeURIComponent(shariff.getOption('mailBody').replace(/\{url\}/i, shariff.getURL()))
}

Expand All @@ -20,6 +20,7 @@ module.exports = function(shariff) {
faName: 'fa-envelope',
title: {
'bg': 'Изпрати по имейл',
'cs': 'Poslat mailem',
'da': 'Sende via e-mail',
'de': 'Per E-Mail versenden',
'en': 'Send by email',
Expand Down
19 changes: 18 additions & 1 deletion src/js/services/pinterest.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,13 +25,30 @@ module.exports = function(shariff) {
name: 'pinterest',
faName: 'fa-pinterest-p',
title: {
'bg': 'Сподели в Pinterest',
'cs': 'Přidat na Pinterest',
'da': 'Del på Pinterest',
'de': 'Bei Pinterest pinnen',
'en': 'Pin it on Pinterest',
'es': 'Compartir en Pinterest',
'fi': 'Jaa Pinterestissä',
'fr': 'Partager sur Pinterest',
'hr': 'Podijelite na Pinterest',
'hu': 'Megosztás Pinteresten',
'it': 'Condividi su Pinterest',
'da': 'Del på Pinterest',
'ja': 'Pinterest上で共有',
'ko': 'Pinterest에서 공유하기',
'nl': 'Delen op Pinterest',
'no': 'Del på Pinterest',
'pl': 'Udostępnij przez Pinterest',
'pt': 'Compartilhar no Pinterest',
'ro': 'Partajează pe Pinterest',
'ru': 'Поделиться на Pinterest',
'sk': 'Zdieľať na Pinterest',
'sl': 'Deli na Pinterest',
'sr': 'Podeli na Pinterest-u',
'sv': 'Dela på Pinterest',
'tr': 'Pinterest\'ta paylaş',
'zh': '分享至Pinterest'
},
shareUrl: url.format(shareUrl) + shariff.getReferrerTrack()
Expand Down
2 changes: 2 additions & 0 deletions src/js/services/print.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ module.exports = function(shariff) {
popup: false,
shareText: {
'bg': '',
'cs': 'tlačit',
'da': '',
'de': 'drucken',
'en': 'print',
Expand All @@ -36,6 +37,7 @@ module.exports = function(shariff) {
},
title: {
'bg': '',
'cs': 'tlačit',
'da': '',
'de': 'drucken',
'en': 'print',
Expand Down
23 changes: 23 additions & 0 deletions src/js/services/qzone.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ module.exports = function(shariff) {
popup: true,
shareText: {
'bg': 'cподеляне',
'cs': 'sdílet',
'da': 'del',
'de': 'teilen',
'en': 'share',
Expand Down Expand Up @@ -36,8 +37,30 @@ module.exports = function(shariff) {
name: 'qzone',
faName: 'fa-qq',
title: {
'bg': 'Сподели в Qzone',
'cs': 'Sdílet na Qzone',
'da': 'Del på Qzone',
'de': 'Bei Qzone teilen',
'en': 'Share on Qzone',
'es': 'Compartir en Qzone',
'fi': 'Jaa Qzoneissä',
'fr': 'Partager sur Qzone',
'hr': 'Podijelite na Qzone',
'hu': 'Megosztás Qzone',
'it': 'Condividi su Qzone',
'ja': 'Qzone上で共有',
'ko': 'Qzone에서 공유하기',
'nl': 'Delen op Qzone',
'no': 'Del på Qzone',
'pl': 'Udostępnij przez Qzone',
'pt': 'Compartilhar no Qzone',
'ro': 'Partajează pe Qzone',
'ru': 'Поделиться на Qzone',
'sk': 'Zdieľať na Qzone',
'sl': 'Deli na Qzone',
'sr': 'Podeli na Qzone-u',
'sv': 'Dela på Qzone',
'tr': 'Qzone\'ta paylaş',
'zh': '分享至QQ空间'
},
shareUrl: 'http://sns.qzone.qq.com/cgi-bin/qzshare/cgi_qzshare_onekey?url=' + url + '&title=' + title + shariff.getReferrerTrack()
Expand Down
Loading

0 comments on commit 25c90e8

Please sign in to comment.