1(function ($) { 2 // Start jQuery 3 Drupal.behaviors.gi5_sitejs = { 4 attach: function (context, settings) { 5 // Get info from Drupal when it's ready 6 once("gi5_sitejs", "html", context).forEach(function () { 7 // Only run this once, when Drupal is ready 8 9 // Add smooth scrolling to all anchor links to IDs 10 $('a[href^="#"]').on("click", function (event) { 11 //console.log("Clicked an anchor link!") 12 var target = $(this.getAttribute("href")); 13 if (target.length) { 14 event.preventDefault(); 15 $("html, body") 16 .stop() 17 .animate( 18 { 19 scrollTop: target.offset().top - 87, 20 }, 21 1000 22 ); 23 } 24 }); 25 26 // Teaser - hover title when image is hovered 27 $(".promo-img-thumb a").hover(function () { 28 $(this) 29 .parentsUntil(".teaser") 30 .siblings() 31 .find(".page-title a") 32 .toggleClass("page-title--hover"); 33 //console.log("Teaser hovered"); 34 }); 35 36 // Hide all brightcove video players 37 $(".ckeditor-brightcove").each(function (index) { 38 $(this).html("<p>Sorry, this video is not available</p>"); 39 }); 40 41 $(".video-js").each(function (index) { 42 if ($(this).data("account")) { 43 //console.log("data video"); 44 $(this) 45 .parent("p") 46 .addClass("ckeditor-brightcove") 47 .html("Sorry, this video is not available"); 48 } 49 }); 50 }); // End once call 51 }, // End Drupal behaviors 52 }; 53 // end file 54})(jQuery, Drupal, drupalSettings);
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.