PageSourceSearch

https://www.landkreis-goeppingen.de/site/LRA-GP-Internet-2024/resourceCached/26b/js/functions-basic.js

js landkreis-goeppingen.de collected 2026-10-02 10:33:07 UTC 23,293 bytes, 556 lines download raw bytes

1
2// ########## Dynamic-Content: items komplett klickbar ##########
3jQuery(document).ready(function ($) {
4    jQuery('.c-dynco').each(function(){
5      var children = jQuery(this).children().length;
6      jQuery(this).addClass('children-' + children)
7      var figures = jQuery('figure', this).length
8      if(figures==0){
9        jQuery(this).addClass('noImages')
10      }
11      jQuery('> article', this).each(function ($) {
12        var categoryMore = jQuery('.date', this);
13        var categoryMoreLinkV2 = jQuery('.moreLink');
14        var categoryMoreLinkHref = jQuery('.date a', this).attr('href');
15        var categoryMoreLinkTitle = jQuery('.date a', this).attr('title');
16        var categoryDate = jQuery('.date', this);
17  
18        jQuery('h2',this).addClass('js-toc-ignore');
19  
20        jQuery(this).wrapInner("<a class='c-dynco__link' href=''></a>");
21        jQuery('.c-dynco__link', this).attr("href", categoryMoreLinkHref);
22        jQuery('.c-dynco__link', this).attr("title", categoryMoreLinkTitle);
23        jQuery('.c-dynco__link', this).attr("aria-label", categoryMoreLinkTitle);
24  
25        //remove tabindex from img
26        jQuery('.c-dynco__link > div figure a', this).attr("tabindex", "-1");
27  
28        jQuery('figure', this).parent().addClass('image')
29  
30        jQuery(categoryMore).remove();
31        jQuery(categoryDate).remove();
32        jQuery(categoryMoreLinkV2).remove();
33  
34        //add default img and icon
35        if(figures > 0){
36          if(jQuery('figure', this).length == 0){
37            jQuery('a.c-dynco__link', this).prepend('<div class="image-default"></div>');
38          }
39        }
40      });
41      jQuery('.image-default', this).append(jQuery('.default-image figure').clone())
42    });
43});
44
45//Font Awesome icons
46jQuery(document).ready(function(){
47    jQuery('.c-icon').each(function(){
48      var text = jQuery(this).text()
49      if(text.includes('*')){
50        var icon = text.substring(text.indexOf("*") + 1, text.lastIndexOf("*")) 
51        jQuery(this).html(function(index, html){
52          if(html.includes('*' + icon + '* ')){
53            return html.replace('*' + icon + '* ', '<i class="far fa-' + icon + ' text"></i>').trim();
54          }
55          else if(html.includes(' *' + icon + '*')){
56            return html.replace(' *' + icon + '*', '<i class="far fa-' + icon + ' text text-after"></i>').trim();
57          }
58          else{
59            return html.replace('*' + icon + '*', '<i class="far fa-' + icon + ' text"></i>').trim();
60          }
61        });
62      }
63      else{
64        if(jQuery('a', this).length > 0){
65          var icon = jQuery('a', this).text();
66          jQuery('a', this).text('');
67          jQuery('a', this).append('<i class="far fa-' + icon + ' link"></i>')
68        }
69        else{
70          var icon = jQuery(this).text();
71          jQuery(this).text('');
72          jQuery(this).append('<i class="far fa-' + icon + ' static"></i>')
73        }
74      }
75    })
76})
77
78// Buttons ohne Link span einfügen
79jQuery(document).ready(function(){
80    jQuery('.c-button').each(function(i){
81      if(jQuery('a', this).length == 0){
82          jQuery(this).wrapInner('<span />');
83      }
84    });
85});
86
87// Dateiformat an externe Dateilinks anhängen
88// jQuery(document).ready(function () {
89//     jQuery('a').each(function(e){
90//       var classes = jQuery(this)[0].className.split(/\s+/);
91//       if(!classes.includes('dateiLink')){
92//         for(var i=0; i < classes.length; i++){
93//           if(classes[i].startsWith('linkTyp')){
94//             jQuery(this).addClass('hasDataLink')
95//             var dataTyp = classes[i].substring(classes[i].lastIndexOf('_') + 1).toUpperCase();
96//             jQuery(this).append('<span class="dateiArt extra"> (' + dataTyp + ')</span>')
97//           }
98//         }
99//       }
100//     })
101// });
102
103
104// Dateiformat an externe Dateilinks anhängen
105jQuery(document).ready(function () {
106  jQuery('a').each(function(e){
107    var classes = jQuery(this)[0].className.split(/\s+/);
108    for(var i=0; i < classes.length; i++){
109      if(classes[i].startsWith('linkTyp')){
110        jQuery(this).addClass('hasDataLink')
111        var dataTyp = classes[i].substring(classes[i].lastIndexOf('_') + 1).toUpperCase();
112        if(dataTyp == "PDF" || dataTyp == "XLSX" || dataTyp == "DOCX" || dataTyp == "PPTX" || dataTyp == "MP3" || dataTyp == "MP4" || dataTyp == "TXT" || dataTyp == "CSV"){
113          if(jQuery('.dateiArt', this).length == 0){
114            jQuery(this).append('<span class="dateiArt extra"> (' + dataTyp + ')</span>')
115          }
116          //Datei Links immer in neuem Tab öffnen - Wunsch Fr. Rauh
117          jQuery(this).attr('target', '_blank')
118        }
119      }
120    }
121    var currentText = jQuery('.dateiGroesse', this).text()
122    jQuery('.dateiGroesse', this).text(currentText.replace(/,/g, ', '))
123  })
124  // jQuery('.c-attachment.binary a').each(function(e){
125  //     var link = $(this).attr('href');
126  //     var linkTyp = link.substr(link.indexOf(".") + 1).toUpperCase()
127  //     var groesse = $(this).next('.dateiGroesse')[0].innerHTML;
128  //     var groesse_new = groesse.substring(2);
129  //     if(linkTyp == "PDF" || linkTyp == "XLSX" || linkTyp == "DOCX" || linkTyp == "PPTX" || linkTyp == "MP3" || linkTyp == "MP4" || linkTyp == "TXT" || linkTyp == "CSV"){
130  //       jQuery(this).append('<span class="dateiArt extra"> (' + linkTyp + ', ' + groesse_new +'</span>');
131  //       $(this).next('.dateiGroesse').hide()
132  //     }
133  //   })
134});
135  
136// Barrierefreier Player focus untertitel
137jQuery(document).ready(function () {
138    jQuery('div.am-mediaplayer.am-videoplayer .mejs-container .mejs-controls .mejs-captions-button > button').on('focusin', function(){
139      jQuery(this).next().css('visibility', 'visible')
140      jQuery(this).parent().next().find('button').on('focusin', function(){
141        jQuery(this).parent().prev().find('button').next().css('visibility', 'hidden')
142      })
143      jQuery(this).parent().prev().find('button').on('focusin', function(){
144        jQuery(this).parent().next().find('button').next().css('visibility', 'hidden')
145      })
146    })
147});
148  
149// Downloadliste ist div wrappen
150jQuery(document).ready(function () {
151    jQuery('.c-downloadlist').each(function(){
152      jQuery(this).wrapAll('<div class="basecontent-downloadlist">');
153    })
154});
155
156//Letztes und erstes Element in l-content markieren
157jQuery(document).ready(function() {
158    jQuery('.l-content > .v-standard:first').addClass('isFirstElement')
159    jQuery('.l-content > .v-standard:last').addClass('isLastElement')
160
161    if(jQuery('.l-content > article:last').attr('id') == jQuery('.vollbild:last').attr('id')){
162      jQuery('.vollbild:last').addClass('isLastElement')
163    }
164    if(jQuery('.l-content > article:last').attr('id') == jQuery('.v-standard:last').attr('id')){
165      jQuery('.v-standard:last').addClass('isLastElement')
166    }
167});
168  
169//change zurück and weiter to arrows at pagination
170jQuery(document).ready(function(){
171  changeText()
172  setTimeout(function () {
173    jQuery('.pagination .page-item a').on('click', function(e) {
174      changeOnClick()
175    }); 
176  }, 250)
177});
178function changeOnClick(){
179  setTimeout(function () {
180    changeText()
181    jQuery('.pagination .page-item a').on('click', function(e) {
182      setTimeout(function () {
183          changeText();
184          changeOnClick()
185      }, 200);
186    });
187  }, 200)
188}
189function changeText(){
190  jQuery('.pagination .page-item, .pager span, .zmNavigClassInnen .zmNavigClassForward, .zmNavigClassInnen .zmNavigClassBack').each(function(e) {
191    var content = jQuery('a', this).text().trim();
192    var content1 = jQuery('button', this).text().trim();
193    var back = "Zurück";
194    var forward = "Weiter";
195    var back1 = "<< zurück";
196    var forward1 = "weiter >>";
197    var all = "Alle"
198    if(content === back || content1 === back || content === back1 || content1 === back1){
199      jQuery('a', this).html('<i class="fal fa-arrow-left"></i>');
200      jQuery('button', this).html('<i class="fal fa-arrow-left"></i>');
201    }
202    if(content === forward || content1 === forward || content === forward1 || content1 === forward1){
203      jQuery('a', this).html('<i class="fal fa-arrow-right"></i>');
204      jQuery('button', this).html('<i class="fal fa-arrow-right"></i>');
205    }
206    if(content === all || content1 === all){
207      jQuery(this).addClass('all');
208    }
209  });
210}
211
212// =========== Kontakt ================
213jQuery(document).ready(function(){
214    //vCard icons einfügen
215    jQuery('.vCard').each(function(e) {
216      jQuery('.bez, .homepage a, .mapsLink a, .efaLink a', this).each(function(){
217        var name = jQuery(this).parent().attr('class')
218        var content = jQuery(this).text()
219        jQuery('<i class="far add-icon icon-' + name + '" aria-label="' + content + '"></i>').insertBefore(jQuery(this))
220      })
221      jQuery('.organization', this).each(function(){
222        var name = jQuery(this).attr('class')
223        var content = jQuery(this).text()
224        jQuery(this).prepend(jQuery('<i class="far add-icon icon-' + name + '" aria-label="' + content + '"></i>'))
225      })
226      jQuery('.street-address', this).each(function(){
227        if(jQuery(this).text() != "" && jQuery(this).text() != '  '){
228          //console.log('in')
229          var name = jQuery(this).attr('class')
230          var content = 'Adresse'
231          jQuery(this).wrapInner('<span class="value"></span>')
232          jQuery(this).prepend(jQuery('<i class="far add-icon icon-' + name + '" aria-label="' + content + '"></i>'))
233        }
234      })
235      if(jQuery('.street-address', this).length == 0){
236        jQuery('.adr', this).each(function(){
237          if(jQuery(this).text() != "" || jQuery(this).text() != '  '){
238            var name = jQuery(this).attr('class')
239            var content = 'Adresse'
240            jQuery(this).prepend(jQuery('<i class="far add-icon icon-' + name + '" aria-label="' + content + '"></i>'))
241          }
242        })
243      }
244    });   
245
246    //Kontakte leere Adresse, Mail entfernen
247    jQuery('div.vCard').each(function(){
248      deleteEmpty(jQuery(this), '.street-address', true, false)
249      deleteEmpty(jQuery(this), '.mail .value', true, false)
250      deleteEmpty(jQuery(this), '.org', false, false)
251      deleteEmpty(jQuery(this), '.fn span', true, false)
252      deleteEmpty(jQuery(this), '.kopf .fn span', false, true)
253    })
254    jQuery('.zmtitel .summary').each(function(){
255      deleteEmpty(jQuery(this), '.zusatzbezeichnung', false, false)
256    })
257});
258  
259function deleteEmpty(vcard, element, parent, parent2){
260    var content = jQuery(element, vcard)
261    if(parent){
262      if(content.html() == " " || content.html() == "  " || content.html() == ""){
263        content.parent().css('display', 'none')
264      }
265    }
266    else if(parent2){
267      if(content.html() == " " || content.html() == "  " || content.html() == ""){
268        content.parent().parent().css('display', 'none')
269      }
270    }
271    else{
272      if(content.html() == " " || content.html() == "  " || content.html() == ""){
273        content.css('display', 'none')
274      }
275    }
276}
277
278// =========== Pressemodul =============
279jQuery(document).ready(function ($) {
280    //News add default image if none there 
281    jQuery('.c-pm-meldung-wrapper').each(function (e){
282      if(jQuery('.c-pm-meldung .c-pm-meldung__bild', this).length > 0){
283  
284      }
285      else{
286        jQuery('.c-pm-meldung', this).prepend("<figure class='c-pm-meldung__bild'><div class='c-pm-meldung__bild-inner-default c-pm-meldung__bild-inner'></div></figure>")
287      }
288    });
289    jQuery('.default-image:not(.dynamic) img').clone().prependTo(jQuery('.c-pm-meldung__bild-inner-default'));
290
291    //Topnews Default Bild 
292    jQuery('.pm-topnews .c-pm-meldung-wrapper').each(function(e){
293        if(jQuery('figure', this).length == 0){
294            var img = jQuery('.extra-divs .default-image-presse img').clone()
295            jQuery('.c-pm-meldung', this).prepend('<figure class="c-pm-meldung__bild c-pm-meldung__bild--default"><div class="c-pm-meldung__bild-inner"></div></figure>')
296            jQuery('.c-pm-meldung .c-pm-meldung__bild--default .c-pm-meldung__bild-inner', this).append(img)
297        }
298    });
299
300    //set max char for teaser in News
301    jQuery('.c-pm-meldung-wrapper').each(function(i){
302      var len=jQuery('.c-pm-meldung__teaser', this).text().replace(/\s\s+/g, ' ').trim().length;
303      if(len>110){
304          var subString = jQuery('.c-pm-meldung__teaser', this).text().replace(/\s\s+/g, ' ').trim().substr(0,110) + '...';
305          jQuery('.c-pm-meldung__teaser', this).text(subString);
306      }
307    });
308    jQuery('.presse-administration .c-pm-meldung-wrapper .c-pm-meldung__teaser').each(function(i){
309        var len=jQuery(this).text().trim().length;
310        if(len>150)
311        {
312            jQuery(this).text(jQuery(this).text().substr(0,150)+'...');
313        }
314    });
315
316    //Pressemitteilungen Artikel in ein div wrappen
317    jQuery('.presse-uebersicht .pm-filter').after('<div class="articleBox"</div>')
318    jQuery('.presse-uebersicht > article').each(function (e) {
319      jQuery(this).appendTo(jQuery(".articleBox"));
320    });
321    
322    jQuery('.presse-administration .pm-filter').after('<div class="articleBox"</div>')
323    jQuery('.presse-administration > .entry').each(function (e) {
324      jQuery(this).appendTo(jQuery(".articleBox"));
325    });
326
327    //Suchbutton
328    jQuery('.pm-search form').find("input[type=submit]").each(function(ev){
329      jQuery(this).css("display", "none");
330      jQuery(this).after('<button type="submit" class="submit" aria-label="Suche starten"> <i class="fal fa-search"></i> </button>');
331    });
332
333    //Filter
334    jQuery('.pm-filter #pm-filter-form').find("button[type=submit]").each(function(ev){
335      jQuery(this).html("Filter:");
336    });
337    jQuery('.pm-filter #pm-filter-form').find("button[type=reset]").each(function(ev){
338      if(jQuery(this).css('display') != 'none'){
339        jQuery(this).html("");
340        jQuery(this).addClass('btn');
341        var url = window.location.origin + window.location.pathname
342        jQuery('<div class="all"><a class="icon" href="' + url + '" role="button" title="alle Meldungen"><i class="fal fa-undo"></i>Filter zurücksetzen</a></div>').insertAfter(jQuery(this).parent());
343        jQuery(this).remove();
344      }
345    });
346  
347    //News add more button
348    jQuery('.pm-topnews .c-pm-meldung-wrapper').each(function (e){
349      jQuery('.c-pm-meldung', this).append("<div class='moreLink'><span>weiterlesen</span></div>")
350    });
351  
352    //move figaption to figure
353    jQuery('.c-pm-meldung figure').each(function (e){
354      jQuery(this).append(jQuery('figcaption', this))
355    });
356  
357    //Pm button
358    jQuery('.pm-detail .pm-parentRubrik').addClass('btn')
359    jQuery('.presse-uebersicht .pm-options > div').addClass('btn')
360    jQuery('.presse-administration .pm-options').addClass('btn')
361
362    //Topnews Sitzung
363    if(jQuery('.v-box.sitzung').length > 0){
364      jQuery('.pm-topnews').each(function(){
365        var topnews = jQuery(this)
366        jQuery('.v-box.sitzung', topnews.closest('.v-standard')).each(function(){
367          var cloneNews = jQuery('.c-pm-meldung-wrapper', topnews).first().clone()
368          cloneNews.removeAttr('class')
369          cloneNews.addClass('c-pm-meldung-wrapper c-pm-meldung-bild c-pm-meldung--sitzung')
370
371          jQuery('.c-image a[data-lightboxgroup]', this).remove()
372          var link = jQuery('.c-image a', this).attr('href')
373          var linktitle = jQuery('.c-image a', this).attr('title')
374          var target = jQuery('.c-image a', this).attr('target')
375          var img = jQuery('img', this)
376          var date = jQuery('.v-einleitung *', this)
377          var title = jQuery('h3', this).text()
378          var content = jQuery('.boxChild > p', this)
379
380          jQuery('.pm-detaillink', cloneNews).attr('href', link)
381          jQuery('.pm-detaillink', cloneNews).attr('title', linktitle)
382          jQuery('.pm-detaillink', cloneNews).attr('target', target)
383          jQuery('.c-pm-meldung__bild-inner img', cloneNews).remove()
384          jQuery('.c-pm-meldung__bild-inner', cloneNews).append(img)
385          jQuery('.c-pm-meldung__datum', cloneNews).text('')
386          jQuery('.c-pm-meldung__datum', cloneNews).append(date)
387          jQuery('.c-pm-meldung__title h3', cloneNews).text(title)
388          jQuery('.c-pm-meldung__teaser', cloneNews).text('')
389          jQuery('.c-pm-meldung__teaser', cloneNews).append(content)
390
391          if(jQuery('.c-image a', this).hasClass('externerLink')){
392            jQuery('.moreLink', cloneNews).addClass('extern')
393          }
394          topnews.prepend(cloneNews)
395          jQuery(this).remove()
396        })
397      })
398    }
399});
400  
401
402// =============== Zusatzmodule ==============
403jQuery(document).ready(function ($) {
404    //Events add default image if none there 
405    jQuery('.basecontent-dvv-zm-vk .item').each(function (e){
406        if(jQuery('.bild img', this).length > 0){
407
408        }
409        else{
410        jQuery('.bild', this).append("<div class='bildcss-default bildcss image'><div class='img'></div>");
411        }
412    });
413    jQuery('.default-image img').clone().prependTo(jQuery('.bildcss-default .img'));
414    
415    //Events wrap link
416    jQuery('.basecontent-dvv-zm-vk .item').each(function (e){
417      var link = jQuery('a.internerLink', this).attr('href')
418      var title = jQuery('a.internerLink', this).attr('title')
419      jQuery(this).wrapInner("<a class='vk-detaillink' href=''></a>");
420      jQuery('.vk-detaillink', this).attr("href", link);
421      jQuery('.vk-detaillink', this).attr("title", title);
422  
423      jQuery('.summary', this).append('<span>' + jQuery('a.internerLink', this).text() + '</span>')
424      jQuery('a.internerLink', this).remove()
425    });
426
427    //Veranstaltungskalender von, bis
428    jQuery('form .von').find("input[type=text]").each(function(ev){
429      if(!jQuery(this).val()) { 
430        jQuery(this).attr("placeholder", "TT.MM.JJJJ");
431      }
432    });
433    jQuery('form .bis').find("input[type=text]").each(function(ev){
434      if(!jQuery(this).val()) { 
435        jQuery(this).attr("placeholder", "TT.MM.JJJJ");
436      }
437    });
438    jQuery('form .zmVolltextSuche').find("input[type=text]").each(function(ev){
439      if(!jQuery(this).val()) { 
440        jQuery(this).attr("placeholder", "Suche");
441      }
442    });
443});
444
445//Erweiterte Suche
446/*===Erweiterte Suche===*/
447
448//ausgewählte Bereiche ausgeben
449function filterLinks() {
450  var elements = document.getElementById("sections").options;
451  for(var i = 0; i < elements.length; i++){
452    elements[i].selected = false;
453  }
454}
455
456jQuery(document).ready(function(){
457  //select and deselect options
458  jQuery('.body_search #extendedSearchSection option').mousedown(function(e) {
459    e.preventDefault();
460    var originalScrollTop = $(this).parent().scrollTop();
461    $(this).prop('selected', $(this).prop('selected') ? false : true);
462    var self = this;
463    $(this).parent().focus();
464    setTimeout(function() {
465        $(self).parent().scrollTop(originalScrollTop);
466    }, 0);  
467    return false;
468  });
469
470  //get selected options as tag
471  jQuery('.body_search #extendedSearchSection').after('<ul class="filteredOptions" style="display: none"><li class="title">Ausgewählte Bereiche:</li></ul>');
472  jQuery('.body_search #extendedSearchSection option').each(function(e) {
473    var option = jQuery(this);
474    if(option.attr('selected')){
475      var selectedOption = option.text();
476      jQuery('<li>' + selectedOption + '</li></ul>').appendTo('.filteredOptions');
477      jQuery('.body_search #search_form .filteredOptions').css('display', 'flex');
478      jQuery('.body_search #search_form .extendedSearch').css('display', 'block');
479      jQuery('.body_search #search_form > span button').addClass('visible');
480      jQuery('.body_search #search_form > span button').on("click", function () {
481        jQuery('.body_search #search_form > span button').removeClass('visible');
482      });
483    };
484  });
485
486  //Filterung zurücksetzen
487  var urlPage = window.location.href;
488  var newUrl = urlPage.substring(0, urlPage.indexOf('&sections'));
489  jQuery('.body_search .filteredOptions').prepend('<li class="searchFilterLinks"><a href="' +newUrl+'" onclick="filterLinks()"><i class="far fa-undo"></i>Filterung zurücksetzen</a></li>');
490
491  // //bei Klick auf erweiterte Suche Klasse hinzufügen
492  // jQuery('.body_search #search_form > span button').addClass('extendedSearch--button')
493  // jQuery('.body_search #search_form > span button').on("click", function () {
494  // jQuery('.body_search #search_form > span button').toggleClass('rotateAfter');
495  // });
496});
497
498//Suchseite div vom Input markieren
499jQuery(document).ready(function(){
500  jQuery('.body_search .searchDiv input[type="search"]').parent().addClass('searchDiv--input')
501  jQuery('.body_search #search_form .searchDiv--input > span').detach().insertAfter(jQuery('.body_search #search_form .searchDiv--input'))
502
503  //bei Klick auf erweiterte Suche Klasse hinzufügen
504  jQuery('.body_search #search_form > span button').addClass('extendedSearch--button')
505  jQuery('.body_search #search_form > span button').on("click", function () {
506    jQuery('.body_search #search_form > span button').toggleClass('rotateAfter');
507  });
508})
509
510//Veranstaltungskalender
511jQuery(document).ready(function(e) {
512  jQuery('.zmview form .zmVolltextSuche').find("input[type=text]").removeAttr('tabindex');
513  jQuery('.zmview form .zmsuchbutton').removeAttr('tabindex');
514
515  jQuery('.zmview form .block.vkRubrik').attr('tabindex', '0');
516  jQuery('.zmview form .block.vkRubrik').on("keyup", function (e) {
517    if (e.key == "Enter"){
518      jQuery('.vkRubrikList').slideToggle(400, function(){
519        jQuery('.vkRubrikList').is(':visible') ? jQuery('#fadeToggle').addClass('visible') : jQuery('#fadeToggle').removeClass('visible');
520      });
521      jQuery('.zmview form .vkRubrikList li').find("input[type=checkbox]").attr('tabindex', '0');
522    }
523  })
524});
525
526//ZM Detailseite
527jQuery(document).ready(function(e) {
528  //Tags anpassen
529  if(jQuery('.zmview').length > 0){
530    jQuery('.zmview .zm-detail h2.zeit').replaceTag('h1')
531    jQuery('.zmview .zm-detail .homepage h4.label').replaceTag('h3')
532  }
533  //Interne Links erkennen
534  jQuery('.zmview .zm-detail a.httpsLink').each(function(){
535    var href = jQuery(this).attr('href')
536    if(href.includes(window.location.hostname)){
537      jQuery(this).addClass('internerLink')
538      jQuery('.add-icon', jQuery(this).parent()).addClass('icon-internLink')
539    }
540  })
541});
542
543(function( $ ) {
544  $.fn.replaceTag = function(newTag) {
545    var originalElement = this[0]
546    , originalTag = originalElement.tagName
547    , startRX = new RegExp('^<'+originalTag, 'i')
548    , endRX = new RegExp(originalTag+'>$', 'i')
549    , startSubst = '<'+newTag
550    , endSubst = newTag+'>'
551    , newHTML = originalElement.outerHTML
552    .replace(startRX, startSubst)
553    .replace(endRX, endSubst);
554    this.replaceWith(newHTML);
555  };
556})(jQuery);

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.