HackerReposA FIELD GUIDE TO OPEN SOURCE
ProSponsor the shelf♧ 0
← Back to top all-time
heiseonline
shariff
JavaScript2014–2021
heiseonline / shariff

shariff

👮 Shariff enables website users to share their favorite content without compromising their privacy.

19Distinct people
25Mentions
0Explicit recommenders
1.4KGitHub stars
REPOSITORY AT A GLANCE

What to know before exploring

What it is

👮 Shariff enables website users to share their favorite content without compromising their privacy.

GitHub

Where it is used

No documented product use was verified in the last source check.

What people are saying

No recommendation phrase was found in the indexed comments.

No classified warning is attached to this page. Read the discussions before treating silence as approval.

Also in these discussions

No other repository is repeatedly linked in the same discussions.

This week on Hacker News

Nov 7–Nov 14 UTC · Direct repository links and separately labeled related project stories. Indexed through 11/14/2026, 5:04:57 PM UTC.

No direct repository links were found in the indexed HN discussions over the past seven days. Older discussions are available below.

Mentions over time

HN mentions by year25 dated mentions

Observed mentions: 2014-11-28 13:15:22 UTC to 2021-09-30 16:21:38 UTC.

0123452014-01-01 00:00:00 UTC to 2015-01-01 00:00:00 UTC (exclusive): 1 mentions; 1 submissions, 0 comments20142015-01-01 00:00:00 UTC to 2016-01-01 00:00:00 UTC (exclusive): 5 mentions; 3 submissions, 2 comments2016-01-01 00:00:00 UTC to 2017-01-01 00:00:00 UTC (exclusive): 5 mentions; 2 submissions, 3 comments2017-01-01 00:00:00 UTC to 2018-01-01 00:00:00 UTC (exclusive): 4 mentions; 0 submissions, 4 comments20172018-01-01 00:00:00 UTC to 2019-01-01 00:00:00 UTC (exclusive): 4 mentions; 1 submissions, 3 comments2019-01-01 00:00:00 UTC to 2020-01-01 00:00:00 UTC (exclusive): 4 mentions; 2 submissions, 2 comments2020-01-01 00:00:00 UTC to 2021-01-01 00:00:00 UTC (exclusive): 1 mentions; 0 submissions, 1 comments2021-01-01 00:00:00 UTC to 2022-01-01 00:00:00 UTC (exclusive): 1 mentions; 0 submissions, 1 comments2021

Counts come from the repository’s dated source evidence. Index cutoff: 2026-11-02 08:16:59 UTC.

View mention counts and date ranges
UTC ranges include their start and exclude their end. Select a period to filter the source evidence.
PeriodStart (UTC)End (exclusive, UTC)MentionsSubmissionsComments
20142014-01-01 00:00:00 UTC2015-01-01 00:00:00 UTC110
20152015-01-01 00:00:00 UTC2016-01-01 00:00:00 UTC532
20162016-01-01 00:00:00 UTC2017-01-01 00:00:00 UTC523
20172017-01-01 00:00:00 UTC2018-01-01 00:00:00 UTC404
20182018-01-01 00:00:00 UTC2019-01-01 00:00:00 UTC413
20192019-01-01 00:00:00 UTC2020-01-01 00:00:00 UTC422
20202020-01-01 00:00:00 UTC2021-01-01 00:00:00 UTC101
20212021-01-01 00:00:00 UTC2022-01-01 00:00:00 UTC101

From the project README

An excerpt from the repository, fetched Nov 13, 2026.

Read the project’s introduction
Shariff – Give Social Media Buttons Some Privacy Shariff enables website users to share their favorite content without compromising their privacy. Demo 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 Download the latest release Upload all files included in the release Include CSS in <head>: shariff.complete.css uses the dependencies included in the release files if Font Awesome is already included in your site, use build/shariff.min.css Include JavaScript right before </body>: shariff.complete.js uses the dependencies included in the release files if jQuery is already included in your site, use build/shariff.min.js Insert one or more <div class="shariff"> elements. Customize the look using data-* attributes. To enable the counters in the buttons, see section Backends. Usage example: <!DOCTYPE html> <html> <head> <link href="/path/to/shariff.min.css" rel="stylesheet"> </head> <body> <h1>My article</h1> <p>Lorem ipsum dolor sit amet, consectetur adipisicing elit.</p> <h2>Minimum buttons:</h2> <div class="shariff"></div> <h2>More advanced buttons:</h2> <div class="shariff" data-backend-url="/path/to/backend" data-url="https://www.example.com/my-article.html" data-theme="grey" data-orientation="vertical"></div> <!-- immediately before </body> --> <script src="/path/to/shariff.min.js"></script> </body> </html> 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 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) Attribute Description Default 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. https://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: buffer, clipboard, diaspora, facebook, flattr, flipboard, info, linkedin, mail, pinterest, pocket, print, qzone, reddit, stumbleupon, telegram, tencent-weibo, threema, tumblr, twitter, vk, weibo, whatsapp, xing twitter, facebook, info 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, 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/Whatsapp page's DC.title/DC.creator or <title> 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 URL 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', }); Events Shariff buttons emit the shariff-share event if they are clicked. $('body').on('shariff-share', function(event) { var service = event.details; ... }); This can be used to track shares using analytics software. It is recommended to register
Read the full README on GitHub

What Hacker News says

25 sources
Already years ago the legal department of the Heise Verlag, publisher of German's biggest IT news site (which is interestingly also one of the biggest German internet sites in general), came to the conclusion that it's actually legally not possible to embed "social widgets" on their site as those widgets would send personal data to their US based "mother ships" without explicit user consent. To circumvent this problem they developed a kind of wrapper around those widgets that won't load the widget (which will than of course inevitably trigger transfer of personal data to the social network in question) until explicitly clicked by the user. This solution was than published under an open-source license so it can be used by any interested webmaster. It's called "Heise Shariff" and can be found on GitHub [1]. [1] https://github.com/heiseonlin
Read the rest
In Court Rules Facebook Widgets Can Be Considered Wiretaps
> Most CMSs have this functionality built in. Which is a big problem for German (and potentially European) publishers due to privacy laws. One major German IT publisher therefore developed an open source privacy preserving tool that strikes a balance: https://github.com/heiseonline/shariff It shows a bunch of buttons but only loads the 3rdparty Javascript when you press them once (ie. show intent to use them) and asks you to press once again (then the native 3rdparty button).
In Mozilla Presses Pause on Facebook Advertising
"While you’re logged onto Facebook, for instance, the network can see virtually every other website you visit. Even when you’re logged off, Facebook knows much of your browsing: It’s alerted every time you load a page with a “Like” or “share” button, or an advertisement sourced from its Atlas network." If you want to enable sharing of your content on FB and other platforms easily but you do not want to support the tracking madness, you might want to use Shariff. It's setup to not send any tracking information to FB etc unless the user wants to share something. https://github.com/heiseonline/shariff
In Data points that Facebook uses to target ads

Showing the 15 most recent of 25 sources. Enable JavaScript to search and browse every indexed mention.

MAKE YOURSELF AT HOME

A few shortcuts

/
Search the collection
?
Open this guide
Esc
Close dialogs and navigation

Your saved repositories and interests stay in this browser.