1/** 2 * @file 3 */ 4 5(function ($, Drupal, drupalSettings) { 6 'use strict'; 7 Drupal.behaviors.ajax_current_page = { 8 attach: function () { 9 if (typeof Drupal.Ajax !== 'undefined') { 10 $(once('jcd-current-page', 'body')).each(function () { 11 Drupal.Ajax.prototype.beforeSend = function (beforeSendOriginal) { 12 var beforeSend = beforeSendOriginal; 13 return function (xmlhttprequest) { 14 if (typeof drupalSettings.path !== 'undefined' 15 && typeof drupalSettings.path.currentPath !== 'undefined' 16 && typeof xmlhttprequest.setRequestHeader === 'function') { 17 xmlhttprequest.setRequestHeader('X-Original-Path', drupalSettings.path.currentPath); 18 } 19 beforeSend.apply(this, arguments); 20 }; 21 }(Drupal.Ajax.prototype.beforeSend); 22 }); 23 } 24 } 25 }; 26})(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.