heiseonline / shariff Goto Github PK
View Code? Open in Web Editor NEW👮 Shariff enables website users to share their favorite content without compromising their privacy.
Home Page: http://ct.de/-2467514
License: MIT License
👮 Shariff enables website users to share their favorite content without compromising their privacy.
Home Page: http://ct.de/-2467514
License: MIT License
Fontawesome released a new version with and WhatsApp Icon. Please put it into our plugin.
wie auch bei einem anderen Tool werden die Zähler bei den xing und linkedin Button nicht korrekt angegeben.
Hier mein Fehlerbericht
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.
If the website has a title with a percentage char, you get an URI-Error from js.
You get these error if you have a string like that: "10% off"
provide a like button for facebook
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.
When i include the new shariff/build/shariff.min.js v1.8.0 i get two sharling list in my shariff container.
Hi,
I developed the Modx Extra LudwigShariff that is using:
The resources:
Cheers,
Thomas
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.
add a button with a normal mailto: function
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.
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?
Problem appears only if gallery is viewed in full browser window view.
Example: http://ix.de/-2482902 , gallery "Der Testflug der NASA-Raumkapsel Orion"
See screenshot
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.
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.
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.
Looks like the files in the build folder in https://github.com/heiseonline/shariff/releases/tag/v1.8.0 are still on version 1.7.4
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.
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.
In my opinion, a nice feature would be to also have a webform integrated. Something like addThis does:
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
I have a problem setting the data-url to a url containing multiple parameters.
My url a like this: http://myHost/index.php?page=einsatz_details&einsatz_id=2910
Setting this string to data-url, twitter and G+ are taking the whole url, facebook cuts it and only takes http://myHost/index.php?page=einsatz_details
Replacing the ampersand & with "& amp;" make facebook working, but breaks twitter and G+
Frank
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?
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.
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:
Using only one service plus the info button, causes the info button being 110px
wide (108px
width + border):
<div class="shariff" data-services="["facebook", "info"]" data-theme="grey">/div>
I didn't have this issue with shariff 1.7.1
Support für Bower.
Siehe #1 (comment)
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
A percent character in the title tag leads to a javascript error. demo page: http://demo.spectrattack.de/shariff/index.html
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')
]
});
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/
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?
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:
How can I fix that? Thanks.
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');
}
}
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.
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.
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
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.
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!
Flattr seems like a match made in heaven for this.
It's still at 1.10
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?
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?
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.
title says all.
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)?
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.
Can you add a info somewhere in the readme about what jQuery Version is required by shariff?
In my experience it is jQuery 1.7 or higher.
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
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.