1// Translates the PhotoSwipe lightbox control labels to German. 2// The control buttons are created when the lightbox OPENS (after page load), 3// so we watch the DOM and (re)apply the labels whenever they appear. 4(function () { 5 var labels = [ 6 [".pswp__button--close", "Bild schlieÃen"], 7 [".pswp__button--arrow--prev", "Vorheriges Bild"], 8 [".pswp__button--arrow--next", "Nächstes Bild"] 9]; 10 11 function apply() { 12 labels.forEach(function (item) { 13 document.querySelectorAll(item[0]).forEach(function (btn) { 14 if (btn.getAttribute("aria-label") !== item[1]) { 15 btn.setAttribute("aria-label", item[1]); 16 btn.setAttribute("title", item[1]); 17 } 18 }); 19 }); 20 } 21 22 apply(); // in case the buttons already exist 23 new MutationObserver(apply).observe(document.documentElement, { 24 childList: true, 25 subtree: true 26 }); 27})();
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.