1(function ($, Drupal) { 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 const $menu = $(`ul#${options.id}`, context); 7 8 // Check if we are to apply the Supersubs plug-in to it. 9 if (options.plugins) { 10 if (options.plugins.supersubs) { 11 $menu.supersubs(options.plugins.supersubs); 12 } 13 } 14 15 // Apply Superfish to the menu. 16 $menu.superfish(options.sf); 17 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})(jQuery, Drupal);
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.