PHPackages                             goalgorilla/shariff - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. goalgorilla/shariff

ActiveNpm-asset

goalgorilla/shariff
===================

Fork of npm-asset/shariff for the Open Social Drupal distribution. Not maintained for use outside of Open Social

3.2.2(3y ago)043JavaScript

Since May 16Pushed 3y agoCompare

[ Source](https://github.com/goalgorilla/shariff)[ Packagist](https://packagist.org/packages/goalgorilla/shariff)[ RSS](/packages/goalgorilla-shariff/feed)WikiDiscussions develop Synced 4w ago

READMEChangelogDependenciesVersions (4)Used By (0)

Open Social disclaimer
======================

[](#open-social-disclaimer)

> We forked this repository for internal use and may abandon this at any time without any notice. We did this because we needed to make changes to the Shariff library which was no longer actively maintained.

Shariff – Give Social Media Buttons Some Privacy [![Build Status](https://camo.githubusercontent.com/076cd48a41463c9d2b0737fe5b825b63b1fa57ccd24e667007baaafe4acb3bf6/68747470733a2f2f7472617669732d63692e6f72672f68656973656f6e6c696e652f736861726966662e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/heiseonline/shariff)
=========================================================================================================================================================================================================================================================================================================================================

[](#shariff--give-social-media-buttons-some-privacy-)

Shariff enables website users to share their favorite content without compromising their privacy. [Demo](http://heiseonline.github.io/shariff/)

[![Shariff Logo © 2015 Heise Medien](https://camo.githubusercontent.com/d7a1f01a47b815c253c8c67ae49042e4d04b2a1677544fd7c889d1755936162d/687474703a2f2f7777772e68656973652e64652f69636f6e732f686f2f736861726966662d6c6f676f2e706e67)](https://camo.githubusercontent.com/d7a1f01a47b815c253c8c67ae49042e4d04b2a1677544fd7c889d1755936162d/687474703a2f2f7777772e68656973652e64652f69636f6e732f686f2f736861726966662d6c6f676f2e706e67)

Some social service providers like e.g. Facebook supply official sharing code snippets which quietly siphon personal data from all page visitors. Shariff enables visitors to see how popular your page is on Facebook and share your content with others without needless data leaks.

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 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
---------------

[](#getting-started)

1. Download the [latest release](https://github.com/heiseonline/shariff/releases/latest)
2. Upload all files included in the release
3. Include CSS in ``:
    - `shariff.complete.css` uses the dependencies included in the release files
    - if [Font Awesome](https://github.com/FortAwesome/Font-Awesome) is already included in your site, use `build/shariff.min.css`
4. Include JavaScript right before ``:
    - `shariff.complete.js` uses the dependencies included in the release files
    - if [jQuery](https://github.com/jquery/jquery) is already included in your site, use `build/shariff.min.js`
5. Insert one or more `` elements.
6. Customize the look using data-\* attributes.

To enable the counters in the buttons, see section [Backends](#backends).

Usage example:

```
>

    My article
    Lorem ipsum dolor sit amet, consectetur adipisicing elit.

    Minimum buttons:

    More advanced buttons:

```

Getting Started using `npm`
---------------------------

[](#getting-started-using-npm)

You can also use Shariff's node package by installing it via `npm`:

```
$ cd my-project
$ npm install shariff --save
```

Edit your JS main script, include Shariff and initialize it in one or more containers:

```
// my-app.js
var Shariff = require('shariff');
var $ = require('jquery');
var buttonsContainer = $('.some-selector');
new Shariff(buttonsContainer, {
    orientation: 'vertical'
});
```

Running demo site
-----------------

[](#running-demo-site)

After downloading Shariff, install its dependencies by running `npm install`.

```
$ git clone https://github.com/heiseonline/shariff.git
$ cd shariff
$ npm install
$ npm run dev
```

Options (data attributes)
-------------------------

[](#options-data-attributes)

AttributeDescriptionDefault`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-button-style`How to display the buttons. Values: `standard`, `icon`, `icon-count`. With `icon` only the icon is shown, with `icon-count` icon and counter and with `standard` icon, text and counter are shown, depending on the display size.`standard``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`, `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``data-media-url`Media url to be shared (pinterest)`null``data-orientation``vertical` will stack the buttons vertically.`horizontal``data-referrer-track`A string that will be appended to the share url. Can be disabled using `null`.`null``data-services`An entity-encoded JSON string containing an array of service names to be enabled. Example: `data-services="[&quot;facebook&quot;,&quot;twitter&quot;]"` Available service names: `twitter`, `facebook`, `linkedin`, `pinterest`, `xing`, `whatsapp`, `mail`, `info`, `addthis`, `tumblr`, `flattr`, `diaspora`, `reddit`, `stumbleupon`, `threema`, `weibo`, `tencent-weibo`, `qzone`, `print`, `telegram`, `vk`, `flipboard`, `pocket`, `buffer``twitter`, `facebook`, `info``data-theme`We include 3 color schemes, `standard`, `grey` and `white`.`standard``data-title`Title to be used as share text in Twitter/Whatsapppage's `DC.title`/`DC.creator` or ```data-twitter-via`Screen name of the user to attribute the Tweet to`null``data-url`The canonical URL of the page to check.page's canonical URL or `og:url` or current URLConstructor arguments
---------------------

[](#constructor-arguments)

All data attributes above are also available as constructor arguments in JavaScript. However, the leading `data-` is omitted and the name is in camelCase instead of kebab-case:

```
var buttonsContainer = $('.some-selector');
new Shariff(buttonsContainer, {
    backendUrl: '/my/backend/url',
    orientation: 'vertical',
    mailUrl: 'mailto:me@example.com',
});
```

Supported browsers
------------------

[](#supported-browsers)

Shariff supports the following Browsers:

- Firefox
- Google Chrome
- Internet Explorer/Edge
- Safari

The current and previous major releases of Firefox, Google Chrome, Internet Explorer/Edge and Safari are supported on a rolling basis.

Supported services
------------------

[](#supported-services)

Shariff supports the following social sharing services:

- AddThis
- buffer
- diaspora\*
- facebook
- Flattr
- Flipboard
- LinkedIn
- Mail
- Pinterest
- Pocket
- Print
- Qzone
- reddit
- StumbleUpon
- Telegram
- Tencent Weibo
- Threema
- Tumblr
- Twitter
- VK
- Weibo
- WhatsApp
- XING

In addition, the service `Info` provides a button to show an info page about the social sharing buttons. The URL of this page can be set with an option. Default value: `http://ct.de/-2467514`, i.e. the c't article introducing Shariff.

Backends
--------

[](#backends)

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

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

Third-party backends:

- [shariff-backend-java](https://github.com/shred/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.

Third-party integrations
------------------------

[](#third-party-integrations)

This is a list of integrations for third-party systems:

- [Contao integration](https://github.com/hofff/contao-shariff)
- [Drupal module](https://www.drupal.org/project/shariff)
- [Joomla! 3 Shariff Plugin](https://github.com/joomla-agency/plg_jooag_shariff)
- [Kirby-CMS Shariff-Plugin](https://github.com/SpicyWeb-de/kirby-plugin-shariff)
- [MediaWiki Extension](https://github.com/vonloxley/Shariff-Mediawiki/)
- [Open Monograph Press Plugin](https://github.com/langsci/shariff)
- [Pagekit Extension](https://pagekit.com/marketplace/package/spqr/shariff)
- [Serendipity](https://github.com/s9y/additional_plugins/tree/master/serendipity_event_social)
- [SilverStripe Module](https://github.com/andrelohmann/silverstripe-shariff)
- [Symfony ShariffBundle](https://github.com/core23/ShariffBundle)
- [TYPO3 Plugin rx\_shariff](http://typo3.org/extensions/repository/view/rx_shariff)
- [Wordpress Plugin shariff-sharing](https://wordpress.org/plugins/shariff-sharing/)
- [WordPress Plugin Shariff Wrapper](https://wordpress.org/plugins/shariff/)
- [Xenforo \[ITM\] ctSSB for Xenforo 1.5](https://github.com/McAtze/-ITM-ctShariffSocialButtons)
- [Xenforo \[WMTech\] Social Share Privacy Plugin](https://wmtech.net/products/wmtech-social-share-privacy.41/)
- [Magento 2 Shariff Social Share](https://www.jajuma.de/en/jajuma-develop/extensions/shariff-social-share-buttons-extension-for-magento-2)

###  Health Score

25

—

LowBetter than 37% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity8

Limited adoption so far

Community19

Small or concentrated contributor base

Maturity50

Maturing project, gaining track record

 Bus Factor2

2 contributors hold 50%+ of commits

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Unknown

Total

1

Last Release

1454d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/acdce96e19c6169e59225f1f72a5ab038c988674f4f530c6275e981c2160dbda?d=identicon)[goalgorilla](/maintainers/goalgorilla)

---

Top Contributors

[![pmb0](https://avatars.githubusercontent.com/u/2140915?v=4)](https://github.com/pmb0 "pmb0 (319 commits)")[![compeak](https://avatars.githubusercontent.com/u/1942208?v=4)](https://github.com/compeak "compeak (304 commits)")[![richard67](https://avatars.githubusercontent.com/u/7413183?v=4)](https://github.com/richard67 "richard67 (56 commits)")[![ipa01](https://avatars.githubusercontent.com/u/9677305?v=4)](https://github.com/ipa01 "ipa01 (36 commits)")[![sehkunde](https://avatars.githubusercontent.com/u/8555890?v=4)](https://github.com/sehkunde "sehkunde (9 commits)")[![liayn](https://avatars.githubusercontent.com/u/222377?v=4)](https://github.com/liayn "liayn (7 commits)")[![dominikmarks](https://avatars.githubusercontent.com/u/8265098?v=4)](https://github.com/dominikmarks "dominikmarks (7 commits)")[![glaszig](https://avatars.githubusercontent.com/u/201135?v=4)](https://github.com/glaszig "glaszig (7 commits)")[![NickDaelemans](https://avatars.githubusercontent.com/u/5577308?v=4)](https://github.com/NickDaelemans "NickDaelemans (6 commits)")[![markusschwarz](https://avatars.githubusercontent.com/u/9694683?v=4)](https://github.com/markusschwarz "markusschwarz (5 commits)")[![ksuess](https://avatars.githubusercontent.com/u/1144737?v=4)](https://github.com/ksuess "ksuess (5 commits)")[![medienverbinder](https://avatars.githubusercontent.com/u/4519686?v=4)](https://github.com/medienverbinder "medienverbinder (5 commits)")[![wmtech-1](https://avatars.githubusercontent.com/u/13788345?v=4)](https://github.com/wmtech-1 "wmtech-1 (4 commits)")[![AndiLeni](https://avatars.githubusercontent.com/u/13385771?v=4)](https://github.com/AndiLeni "AndiLeni (4 commits)")[![craiq](https://avatars.githubusercontent.com/u/5095392?v=4)](https://github.com/craiq "craiq (4 commits)")[![DenizSesli](https://avatars.githubusercontent.com/u/9694043?v=4)](https://github.com/DenizSesli "DenizSesli (4 commits)")[![McAtze](https://avatars.githubusercontent.com/u/8874582?v=4)](https://github.com/McAtze "McAtze (4 commits)")[![osahner](https://avatars.githubusercontent.com/u/1849725?v=4)](https://github.com/osahner "osahner (4 commits)")[![JaJuMa](https://avatars.githubusercontent.com/u/12202801?v=4)](https://github.com/JaJuMa "JaJuMa (2 commits)")[![rolandgeider](https://avatars.githubusercontent.com/u/2280729?v=4)](https://github.com/rolandgeider "rolandgeider (2 commits)")

### Embed Badge

![Health badge](/badges/goalgorilla-shariff/health.svg)

```
[![Health](https://phpackages.com/badges/goalgorilla-shariff/health.svg)](https://phpackages.com/packages/goalgorilla-shariff)
```

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
