GitXplorerGitXplorer
f

social-proof-no-dependencies

public
3 stars
0 forks
0 issues

Commits

List of commits on branch master.
Unverified
2b95d8fdafabcf44862980c40364a534f7596e74

call some collections only after an event

ffranzenzenhofer committed 8 years ago
Unverified
73286d0e329b09a0e52ee5ef61d88127738994b2

some counts are now checked immidiatly, some after the onscroll event

ffranzenzenhofer committed 8 years ago
Unverified
84410096d54e1dc5b83e78d75fe8322f007a0a1d

asking https:// URLs by default

ffranzenzenhofer committed 8 years ago
Unverified
f1cff6ccbd004fc83a2b4cacc65d360939d08eb1

now checks for http and https values of the URL

ffranzenzenhofer committed 8 years ago
Unverified
e24bc6b0650352f8d77c91148c4f3a2d7b1ee66a

updated to fb graph api as old rest api is deprecated

ffranzenzenhofer committed 8 years ago
Unverified
612fb3072a0faa8cd6a7fe14981c4998103d7885

not updated if zero counter

ffranzenzenhofer committed 9 years ago

README

The README file for this repository.

#a simple social proof javascript that checks fb, pinterest, linkedin without any external dependencies (like jquery)

install

<script src="https://raw.githubusercontent.com/franzenzenhofer/social-proof-no-dependencies/master//social-proof-no-dependencies/main.js"></script>

usage

socialProof(url, class_name)

#fetches sharecounts and writes it into (all) the elements with the class "counter"
socialProof('http://www.veganblatt.com/', 'counter')

if url is null it uses the URL of the og:url element if og:url is not available, then is uses the canoncial if the canonical is not avaialbe, it uses the window.top.location

socialProof(null, 'counter')

if class_name is null, the counter is written to the console (if availalbe)

socialProof()
socialProof('http://www.veganblatt.com/')

with

var _DEBUG_ = true;

you will get some debug output on the console

this code has a serious limitation: you can only call it once per page? otherwise I would have needed to re-invent dynamic callbacks, and I didn't want to do that yet (TODO)