root / htmltest / sites / all / modules / addthis / addthis.js @ a5572547
1 |
(function ($) { |
---|---|
2 |
|
3 |
Drupal.behaviors.addthis = { |
4 |
attach: function(context, settings) { |
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 |
} |
23 |
} |
24 |
} |
25 |
|
26 |
} |
27 |
} |
28 |
|
29 |
}(jQuery)); |