1(function ($, Drupal, once) { 2 Drupal.behaviors.superfish = { 3 attach(context, drupalSettings) { 4 // Take a look at each menu to apply Superfish to. 5 $.each(drupalSettings.superfish || {}, function (index, options) { 6 $(once('superfish', `ul#${options.id}`, context)).each(function () { 7 const $menu = $(this); 8 9 // Check if we are to apply the Supersubs plug-in to it. 10 if (options.plugins) { 11 if (options.plugins.supersubs) { 12 $menu.supersubs(options.plugins.supersubs); 13 } 14 } 15 16 // Apply Superfish to the menu. 17 $menu.superfish(options.sf); 18 // Check if we are to apply any other plug-in to it. 19 if (options.plugins) { 20 if (options.plugins.touchscreen) { 21 $menu.sftouchscreen(options.plugins.touchscreen); 22 } 23 if (options.plugins.smallscreen) { 24 $menu.sfsmallscreen(options.plugins.smallscreen); 25 } 26 if (options.plugins.supposition) { 27 $menu.supposition(); 28 } 29 } 30 }); 31 }); 32 }, 33 }; 34})(jQuery, Drupal, once);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.