Posted by benpjohnson on May 27, 2009 at 9:52pm
| Project: | AddThis |
| Version: | 6.x-2.8 |
| Component: | Code |
| Category: | feature request |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | closed (fixed) |
Issue Summary
When multiple addthis buttons are on a single page they each come with their own script tag. This patch only includes the tag once in the head.
Not sure you want this one as the code isn't the cleanest, I took the google analytics module approach to workaround the lack of support for external js in drupal_add_js(). Works a treat on my site though as I have an addthis button next to each content item.
| Attachment | Size |
|---|---|
| 0001-fix-addthis-to-only-insert-one-script-tag.patch | 2.62 KB |
Comments
#1
I've updated this patch for 6.28 after finally getting my patch management system in order.
#2
Thank you for the patch. However we already have a counter variable $_addthis_counter for keeping track on how many buttons we have on a single page. I reimplemented your patch for latest dev version on slightly different way. Some changes are still not quite ready, but I will commit a new version soon.
#3
Great thanks!
One more patch I don't need to worry about :)
#4
Next version with this issue fixed in it will be out on next week. Sorry about the delay.
#5
Automatically closed -- issue fixed for 2 weeks with no activity.