/[drupal]/contributions/modules/sharethis/sharethis.js
ViewVC logotype

Diff of /contributions/modules/sharethis/sharethis.js

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph | View Patch Patch

revision 1.1.4.1, Thu Jan 8 23:22:01 2009 UTC revision 1.1.4.2, Tue Aug 18 17:10:33 2009 UTC
# Line 0  Line 1 
1    // $Id$
2    
3    /**
4     * Compatibility with the Drupal 6 API.
5     */
6    Drupal.behaviors = Drupal.behaviors || {};
7    $(document).ready(function() {
8      Drupal.behaviors.sharethis(document);
9    });
10    
11    /**
12     * The Drupal behaviors for the ShareThis web service.
13     */
14    Drupal.behaviors.sharethis = function(context) {
15      $('.sharethis-button:not(.sharethis-button-processed)', context).addClass('sharethis-button-processed').each(function (i, domElement) {
16        var element = $(this);
17        var shared_object = SHARETHIS.addEntry({
18          title: element.attr('title'),
19          url: element.attr('href')
20        });
21        var chicklet = element.attr('name');
22        if (chicklet != 'sharethis') {
23          shared_object.attachChicklet(chicklet, domElement);
24        }
25        else {
26          shared_object.attachButton(domElement, {button: false});
27        }
28      }).click(function() {
29        return false;
30      });
31    };

Legend:
Removed from v.1.1.4.1  
changed lines
  Added in v.1.1.4.2

  ViewVC Help
Powered by ViewVC 1.1.2