1(function ($, Drupal,drupalSettings ) { 2 Drupal.behaviors.view_page_totals = { 3 attach: function (context) { 4 const view_totals = $('#view-page-totals'); 5 let pages_total = view_totals.data('total-page'); 6 let pages_current = view_totals.data('current-page'); 7 let page_title = drupalSettings.head_title_array; 8 let searchParams = new URLSearchParams(window.location.search) 9 10 if (pages_total !== pages_current || pages_total > 1 || searchParams.has('keys') || searchParams.has('key')) { 11 let key = searchParams.has('keys') ? searchParams.get('keys') : searchParams.has('key') ? searchParams.get('key') : ''; 12 document.title = page_title.title + 13 (((searchParams.has('keys') || searchParams.has('key')) && key !== '') ? ' - ' + Drupal.t('Search results for the term(s): @keyword', {'@keyword' : key}) : '') + 14 ((pages_total !== pages_current || pages_total > 1) ? ' - ' + Drupal.t("Page @current from @from", {'@current' : pages_current, '@from' : pages_total}) : '') + 15 ' | ' + page_title.name; 16 } 17 } 18 } 19})(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.