Révision 4543c6c7
Ajouté par Assos Assos il y a plus de 10 ans
htmltest/sites/all/modules/addthis/addthis.js | ||
---|---|---|
2 | 2 |
|
3 | 3 |
Drupal.behaviors.addthis = { |
4 | 4 |
attach: function(context, settings) { |
5 |
$.getScript( |
|
6 |
Drupal.settings.addthis.widget_url, |
|
7 |
function(data, textStatus) { |
|
8 |
addthis.init(); |
|
5 |
|
|
6 |
// If addthis settings are provided a display is loaded. |
|
7 |
if (typeof Drupal.settings.addthis != 'undefined') { |
|
8 |
|
|
9 |
if (typeof Drupal.settings.addthis.load_type != 'undefined') { |
|
10 |
if (Drupal.settings.addthis.load_type == 'async') { |
|
11 |
addthis.init(); |
|
12 |
} |
|
13 |
if (Drupal.settings.addthis.load_type == 'domready') { |
|
14 |
$.getScript( |
|
15 |
Drupal.settings.addthis.widget_url, |
|
16 |
function(data, textStatus) {}); |
|
17 |
} |
|
18 |
// Trigger ready on ajax attach. |
|
19 |
if (context != window.document && window.addthis != null) { |
|
20 |
window.addthis.ost = 0; |
|
21 |
window.addthis.ready(); |
|
22 |
} |
|
9 | 23 |
} |
10 |
); |
|
11 |
if (context != window.document && window.addthis != null) { |
|
12 |
window.addthis.ost = 0; |
|
13 |
window.addthis.ready(); |
|
14 | 24 |
} |
25 |
|
|
15 | 26 |
} |
16 |
};
|
|
27 |
} |
|
17 | 28 |
|
18 | 29 |
}(jQuery)); |
Formats disponibles : Unified diff
Weekly update of contrib modules