Giter Site home page Giter Site logo

heiseonline / shariff Goto Github PK

View Code? Open in Web Editor NEW
1.4K 1.4K 176.0 7.25 MB

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

Home Page: http://ct.de/-2467514

License: MIT License

JavaScript 79.15% Less 20.78% Shell 0.06%
css frontend javascript privacy shariff

shariff's People

Contributors

ahoiroman avatar andileni avatar compeak avatar core23 avatar craiq avatar ddeimeke avatar denizsesli avatar dominikmarks avatar dsuppiger avatar glaszig avatar globalworming avatar ipa01 avatar jajuma avatar jan-at-mpa avatar ksuess avatar liayn avatar markusschwarz avatar mcatze avatar medienverbinder avatar mikejpr avatar nonamepro0 avatar osahner avatar pmb0 avatar richard67 avatar rolandgeider avatar sehkunde avatar so-ri avatar ufuk-avcu avatar wannevancamp avatar wmtech-1 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

shariff's Issues

jQuery error if backend returns null

With included PHP backend, the backend returns null if there are no shares for either of the passed services. In this case, I receive the following jQuery error in the console:

TypeError: a is null
...rCase()},each:function(a,b,c){var d,e=0,f=a.length,g=r(a);if(c){if(g){for(;f>e;e...

The error points to f=a. I think the expected behavior would be to display "0" for each service instead of returning null.

add simple :hover effect for buttons

Hi there,

it would be nice to have a simple mouseover effect for :hover events, like so:

.shariff .facebook a {
background-color: #3b5998
transition: background-color 0.4s ease-in-out;
}

Makes the user experience much nicer ;)
Thx for the great work so far!

make mail-button configurable

We're working on a Contao CMS plugin of Shariff https://github.com/hofff/contao-shariff. Actually the function of the mail-button is a redirect to a recommendation form customized for your website. That's not so good because we can't individualize this function.

A handy solution would be to make it configurable like the twitter-via option, so we can overwrite the redirect target for the page containing the recommendation form.

Provide a CSS without FontAwesome

I have already included FontAwesome in my layout from a local ressource. But the default shariff.min.css include FontAwesome once again from a global CDN... so FontAwesome will loaded twice!
I propose a shariff.min.css without FontAwesome and a shariff.complete.css including FontAwesome, similar to the js file.

How to get usage statistics?

Does anyone do stats of the usage of their shariff buttons?
If so, how do you do it?

I'd like to get some statistics on which buttons are clicked how often, maybe also on which pages, to decide which buttons i keep, etc.
Maybe in Google Analytics, Piwik, or on some standalone thing...
Could the shariff backend possibly do this? It might also be interesting to see discrepancies between clicks and finished posts, aka the counts that the backend returns for eg. facebook.

Mail Button opens new Tab in Chrome

The Mail Button opens a new Tab in Google Chrome. This is caused by the target="_blank" attribute.
A fix for this could be:

if(service.name != 'mail'){
    if (service.popup) {
        $shareLink.attr('rel', 'popup');
    } else {
        $shareLink.attr('target', '_blank');
    }
}

Icons not shown on Firfefox with HTTPS Everywhere Add-on

I ran into a complex issue I can't solve myself.

The setting:
Firefox 38.0.1
HTTPS Everywhere Add-on 5.0.5
shariff 1.13.0

The problem:
The shariff icons are not displayed on the sharing buttons on my website while HTTPS Everywhere is activated:
http://alpenwetter.md-soft.info/

shariff_without_icons

After disabling HTTPS Everywhere, the icons are shown on the sharing buttons without problem.

The shariff demo site works without problems with activated HTTPS Everywhere Firefox add-on.
https://heiseonline.github.io/shariff/

Thus the problem might be a specific interference on my website(s).
Does anyone have a hint, how I can solve this problem?

only german language works

i tried to set the language used from "browser selected" to "english" and its still german. => teilen button for facebook. after this i also tried french, which also does not work.

shariff Version 2.2.4
wordpress 4.2.2.

teilen-bug

Shariff integration with Privacy Badger

I work on an opensource browser add-on called Privacy Badger (https://github.com/EFForg/privacybadgerchrome) that is meant to protect users from online tracking. We currently have an aspect of it that is similar to shariff (https://github.com/EFForg/privacybadgerchrome/blob/master/src/socialwidgets.js). But in my opinion Shariff's solution seems nicer. I'm curious if someone from this project would be willing to contribute to Privacy Badger to add Shariff style widget blocking to Privacy Badger

data-title

Hello,

right now shariff uses the meta description to generate for example the tweet text and only uses the titel attribute as a fallback, if no meta description is found. Woulnd't it be more logical the other way around? Because when I provide the data-title attribute I most likely want shariff to use that and not ignore it for the sake of the meta describtion, otherwise I wouldn't bother to put it in, in the first place.

Or is there any other reason to ingore the data-title attribute?

startef

http and https: protocol-free share counter?

Is it somehow possible, to count the share-values of a network regardlessly if the link is shared with http or https?
I have a website, that can be called with http and https. I noticed, that the share-values are different, when calling them with different protocols. It depends, if the link has been shared with or without https.
Is there a way to combine these two values into one link-count per button?

infoUrl cannot be set by data-* attribute

In current Firefox, its not possible to add an own infoUrl per data-attribute

$('.shariff').attr('data-infoUrl', 'http://www.berlin.de/wir-ueber-uns-be/agb/pp/20150101/#socialplugins');

The browser will add the data-attribute, BUT it will become a "data-infourl" (all lowercase).

There are three ways to solve it:

  • a) accept a "data-infourl" too, for overwriting the infoUrl parameter
  • b) change the internal infoUrl option to "infourl" (all lowercase), or
  • c) Give the possibility to give an whole options-json-array to _Shariff
    • as c1) later callable as global function _Shariff(this, {infoUrl: 'http://www...'})
      see Issue #34
    • or as c2) a new data attribute data-options:
      data-options="{infoUrl: 'http://www...', theme: 'white'}"

shariff.min.js v1.8.0

When i include the new shariff/build/shariff.min.js v1.8.0 i get two sharling list in my shariff container.

Add via tag for twitter

It would be nice to be able to add the "via" tag for twitter shares, meaning adding &via=twittername to the twitter link. Of course it would also be useful to then add a field to the backend where you could enter your twitter name.

Shariff not working w/o Backend?

Hi,
I try to use Shariff w/o Backend which works with <div class="shariff clear"></div>.
But as soon as I add the data-services tag to customize the buttons it disappears at the front-end. What might be the reason? Btw. I'm using shariff.min.js and shariff.complete.css.

How to configure the mail button?

i got shariff and the backend working, but the mail button initially did just open the page in a new tab, with ?view=mail attached to the URL.
I expected it to work without config, as the other buttons.
I thought it would open a mail with a set subject, and the page URL in the body, like seen here:
http://granaton.com/shariff-social-sharing-wordpress/

With data-mail-url="mailto:[email protected]" added to the div, the mail program opens with a recipient set, but no other content...

Do i need to configure something else?

EDIT:
I was wondering what the idea behind the default value ?view=mail for data-mail-url was.
Now i saw on heise online, that it's used there to bring up a webform to mail the article...
So, it DOES look like the mail button needs extra config.

Not showing up correctly on my website

Well tried it out on my website. Since it's a "Baukasten-Website" (kwoxer.de), it has no real FTP access.

So I tried to link to the Github RAW content. No share button comes up in the bottom right. Just the text... but looking in the Firefox Inspector he seems to find the JS and CSS.

Since there are no errors in the console, here are the things I did so far:

  • css into head via link
  • before body ends the complete.js
  • and in the bottom right told him to show the default shariff

How can I fix that? Thanks.

info button too wide for col-2 usage

Using only one service plus the info button, causes the info button being 110px wide (108px width + border):

<div class="shariff" data-services="[&quot;facebook&quot;, &quot;info&quot;]" data-theme="grey">/div>

I didn't have this issue with shariff 1.7.1

Docs: Provide Custom-Build instructions

Atm shariff-complete is a whopping ~125kb fat lib.

For most websites you only need a few out of all supported social-media services, so it would be awesome if you could provide instructions on how to build shariff for such a website.

TypeError $ is not a function

Well I just wanted to test the great project. So I just tested it locally. XAMPP running on a Windows.

But somehow it just gives me an error. It seems that something with jQuery is not working properly.
http://i.imgur.com/fGTvzc0.png

If you need more infos, please let me know. Thanks.

provide a local like option

It would be good to have local like option, like it is provided by the plugin "https://wordpress.org/plugins/wp-likes/" (which is not developed anymore). A local like option would also be in the sense of keeping privacy. Having it here in the plugin in the same design would make it easiert and more appealing for bloggers to implement it.

Git Tags off by one version?

If i browse here on github to eg. /build and select a tag, the version in the code is off by one version:

shariff-tags

Looks like a github problem at first, but i don't see that on other projects...

(I'm new to git/github, so it might be me misunderstanding...)

Issue with $ as jQuery namespace

When implementing the library in Drupal I get the following error:

TypeError: $ is not a function

See http://stackoverflow.com/a/23739123.

"Drupal 7 provides jQuery in the no-conflict mode, which means that $ is not the jQuery object/namespace. This should not be an issue with properly written jQuery plugins that follow jQuery's plugins authoring documentation."

Please note that just wrapping the code in a anonymous function didn't fix it for me. Adding var $=jQuery; does the job, but is not a valid solution of course.

Is there a way to know what user has clicked in the popup

Hi,

is there a way to know what the user has clicked in the popup.
If he has pressed "like" or "cancel".

I would like to use this information to "fake update" the counter.
If the user has liked the content, the counter could be increased by one go give him instand feedback.
If the user canceled the context - nothing should happen.

Any other ideas for this suggestion?

Mail-button default functionality broken

A followup to #58, i found out that using version 1.4.7 DOES have a working mail-button out of the box.
It will open a new mail with the page-title as subject, and the URL in the Message.

Is this deprecated functionality, or is it a bug?

Remove the protocol when querying the backend

On a site with both http and https, I have a backend (using the node version, proxied via nginx to handle the ssl and CORS enabled), and the queries are different:

from the https version:
https://backend.example.org/?url=https%3A%2F%2Fwww.example.org
from the http version:
https://backend.example.org/?url=http%3A%2F%2Fwww.example.org

and it returns different numbers for the http and the https option

However, if I manually change the url to
https://backend.example.org/?url=www.example.org

I get the number I want, no matter if I query from the https or the http site.

Is there an option to not take into account the protocol ? Would it make more sense to modify the client to query without the http or https or change the backend server to remove the protocol?

Shariff class not callable lately

Our pages include as a tag<div id="socialshare"></div> (from former socialshare-privacy plugin).
Before we could use after dom-ready a javascript-call:

$('#socialshare').socialSharePrivacy( settings );

Now all is encapsulated as anonymous functions.

How we can call it now at a later like any othe jquery-plugin

Not working was the initial code:

__Shariff($('#socialshare'), {theme:'white'})

How we can call the _Shariff function from extern javascript in a normal html-page (not a node-app)?

Extract non-library dependencies in slim.js

NPM (and browserify) allows to specify files within a package like this:

require('shariff/src/js/services/facebook')

If the structure of this package was like this:

services/facebook.js
services/...js
index.js
slim.js

with slim.js containing only the shariff logic without "services" It would be easily possible to "custom build" a shariff library with support for only facebook like this.

var Shariff = require('shariff/slim')
Shariff(container, {
  services: [
     require('shariff/services/facebook'),
     require('shariff/services/twitter')
  ]
});

Provide Threema Support

Since What's'App is supported, it would nice to have support for other messengers, especially Threema, which should only be displayed on mobile devices.

Ideas for improved mail functionality

In my opinion, a nice feature would be to also have a webform integrated. Something like addThis does:

addthis-mail

Instead of (or in addition to) the webmail-links i'd add a "use your mail app" link, and i'd place this at the top, not bottom, as i think the own mail app is more user-friendly if you are on your own device.
But for other cases the form would be a good addition.

The mail button is maybe a bit away from shariff's core functionality of being a privacy proxy, but i like it a lot, so i add my thoughts here as a reference and hope it's not seen as an abuse of the issue que.

PS:
Maybe also document the intended use of the default mail url parameter ?view=mail

jquery als externe dependency

Ich denke es macht mehr Sinn jQuery nicht mit in den build zu packen. Das blaeht die lib nur unnoetig auf (200KB unminimiert) und jQuery hat ohnehin fast jede Webseite schon eingebunden. D.h. die meisten haetten durch diese Lib jQuery dann doppelt eingebunden.

Possibility to add languages

At the moment shariff supports only 3 languages: de, en, es

On multilingual sites you often have italian or french, maybe dutch or any other languages.

Please implement a possibility to add transations for all services without modifying the original min.js files.

Possibility 1: before using internal translation, check for a global hash variable like shariff_translations holding translations for all services.

Possibility 2: add a global accessible method to add more localisations by javascript during runtime.
The method could recieve two arguments like this: ('langcode', {googleplus: 'translation for googleplus'}

Possibility 3: add an optional data attribute like data-locale containing translations for all services in a hash. If given, ignore language settings and use the translations defined in data-locale.

Maybe there is a better solution than my 3. Would just be great to have a possibility to add more languages to shariff.

provide diaspora as an option

Would be nice to have a "share on diaspora" option too. I know they are not compromising privacy, but it is a kind of shame that they are missing because of this. On first klick the the user would provide his pod-address which then would be stored locally.

Bower Support

Support für Bower.

Siehe #1 (comment)

Create a Bower Package

PS: Sollte das Feature als nützlich eingestuft werden, aber mit niedriger Priorität, würde ich mich bereit erklären dies zu implementieren. Jedoch möchte ich auch anmerken, dass ich bisher noch kein Bower Package erstellt habe.

EDIT:
Erklärungsabsatz durch Verweis auf ursprüngliche Idee ersetzt

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.