tmort / Socialite

Other
1.68k stars 164 forks source link

Allowing re-parsing of inserted Pinterest links #84

Closed McGeekiest closed 9 years ago

McGeekiest commented 10 years ago

Links added to the DOM, properly tagged for Socialite, would not be re-parsed as buttons by the Pinterest script. This commit adds a 'data-pin-build' attribute to the pinit.js script tag to expose the parsePinBtns() function and replaces the reloadNetwork call with a call to this function.

I am currently using my modified code at http://tilearray.com to change Pinterest button properties when a mosaic's owner makes changes via an AJAX call. To demo:

  1. Visit the site and make a mosaic
  2. Click the Pinterest button to begin a share
  3. Close the window without sharing
  4. Add a title for your mosaic
  5. Click the Pinterest button again

Let me know if I'm not doing something "the Socialite way". :-)