addtoany.js 360 B

1234567891011121314
  1. /* global a2a*/
  2. (function (Drupal) {
  3. 'use strict';
  4. Drupal.behaviors.addToAny = {
  5. attach: function (context, settings) {
  6. // If not the full document (it's probably AJAX), and window.a2a exists
  7. if (context !== document && window.a2a) {
  8. a2a.init_all('page'); // Init all uninitiated AddToAny instances
  9. }
  10. }
  11. };
  12. })(Drupal);