Julienh / Sharrre

Make your sharing widget! Sharrre is a jQuery plugin that allows you to create nice widgets sharing for Facebook, Twitter, Google Plus (with PHP script) and more.
sharrre.com
MIT License
1.04k stars 411 forks source link

One request is sent for each element sharrre applies to. #229

Open w0rp opened 9 years ago

w0rp commented 9 years ago

Suppose you use a class for sharrre so you can set up sharing blocks in more than one place on a page. For example, putting sharing links at the top and bottom of articles. You will write something like this.

$(".some-class-name").sharrre({
    share: {
        googlePlus: true,
        facebook: true,
        twitter: true
    }
});

Doing this will send one request to each site (Google+, Facebook, Twitter) for each element to which the sharing links are applied. (M * N requests, where M is the number of elements and N is the number of sharing sites.) I suggest that instead, sharrre should send one request for each site, and then apply the results to all of the matched elements. (N requests)

oucil commented 9 years ago

+1