Commit 8b28551d authored by Joe 🤘 Shindelar's avatar Joe 🤘 Shindelar
Browse files

Issue #3274912 by eojthebrave: Remove jQuery dependency

parent 21c70abf
Loading
Loading
Loading
Loading
+6 −7
Original line number Diff line number Diff line
@@ -3,18 +3,17 @@
 * Basic prism settings.
 */

(function ($, Drupal, drupalSettings) {
(function (Drupal) {
  'use strict';

  Drupal.behaviors.prism = {
    attach: function(context, settings) {
      // Check if an ajax call has been made.
      $(document).ajaxComplete(function() {
        // Make sure we highlight any newly added content.
        // @todo, target specific content wrapper(s)?
      // Trigger prism to highlight things on the page again after an AJAX
      // operation has completed.
      if (context instanceof HTMLElement) {
        Prism.highlightAll();
      });
      }
    }
  };

})(jQuery, Drupal, drupalSettings);
 No newline at end of file
})(Drupal);