PageSourceSearch

https://www.vgdormitz.de/wp-content/cache/min/1/wp-content/plugins…/assets/copyright-overlay.js?ver=1790771634

js vgdormitz.de collected 2026-10-02 16:48:50 UTC 3,483 bytes, 11 lines download raw bytes

1(function(){'use strict';function escapeHtml(str){return String(str).replace(/&/g,'&amp;').replace(/</g,'&lt;').replace(/>/g,'&gt;').replace(/"/g,'&quot;')}
2function closeAllPopovers(){document.querySelectorAll('.ga-copyright-popover').forEach(function(p){p.remove()});document.querySelectorAll('.ga-copyright-btn').forEach(function(b){b.setAttribute('aria-expanded','false')})}
3function openPopover(btn,img){closeAllPopovers();var copyright=img.getAttribute('data-copyright')||'';var altText=img.getAttribute('data-alt')||'';var popover=document.createElement('div');popover.className='ga-copyright-popover';popover.setAttribute('role','dialog');popover.setAttribute('aria-label','Bildinfo');var html='';if(copyright){html+='<p class="ga-copyright-text"><strong>Copyright:</strong> '+escapeHtml(copyright)+'</p>'}
4if(altText){html+='<p class="ga-copyright-alttext"><strong>Bildbeschreibung:</strong> '+escapeHtml(altText)+'</p>'}
5popover.innerHTML=html;btn.setAttribute('aria-expanded','true');popover.style.visibility='hidden';document.body.appendChild(popover);var rect=btn.getBoundingClientRect();var popH=popover.offsetHeight;var rightOffset=Math.max(4,window.innerWidth-rect.right);if(rect.top-popH-4>=0){popover.style.top=(rect.top-popH-4)+'px'}else{popover.style.top=(rect.bottom+4)+'px'}
6popover.style.right=rightOffset+'px';popover.style.left='auto';popover.style.visibility=''}
7function initImage(img){var copyright=img.getAttribute('data-copyright');var altText=img.getAttribute('data-alt');if(!copyright&&!altText)return;if(img.parentNode&&img.parentNode.classList&&img.parentNode.classList.contains('ga-copyright-wrap'))return;var wrap=document.createElement('span');wrap.className='ga-copyright-wrap';img.parentNode.insertBefore(wrap,img);wrap.appendChild(img);var btn=document.createElement('button');btn.type='button';btn.className='ga-copyright-btn';btn.setAttribute('aria-label','Bildinfo anzeigen');btn.setAttribute('aria-expanded','false');btn.setAttribute('title','Copyright & Bildbeschreibung');btn.innerHTML='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="14" height="14" fill="currentColor" aria-hidden="true"><path d="M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm1 15h-2v-6h2v6zm0-8h-2V7h2v2z"/></svg>';btn.addEventListener('click',function(e){e.stopPropagation();if(btn.getAttribute('aria-expanded')==='true'){closeAllPopovers()}else{openPopover(btn,img)}});btn.addEventListener('keydown',function(e){if(e.key==='Escape')closeAllPopovers()});wrap.appendChild(btn)}
8function initAll(){document.querySelectorAll('img[data-copyright], img[data-alt]').forEach(initImage)}
9document.addEventListener('click',function(e){if(!e.target.closest('.ga-copyright-wrap')&&!e.target.closest('.ga-copyright-popover')){closeAllPopovers()}});document.addEventListener('keydown',function(e){if(e.key==='Escape')closeAllPopovers()});window.addEventListener('scroll',closeAllPopovers,{passive:!0,capture:!0});if(document.readyState==='loading'){document.addEventListener('DOMContentLoaded',initAll)}else{initAll()}
10var observer=new MutationObserver(function(mutations){mutations.forEach(function(mutation){mutation.addedNodes.forEach(function(node){if(node.nodeType!==1)return;if(node.tagName==='IMG'&&(node.hasAttribute('data-copyright')||node.hasAttribute('data-alt'))){initImage(node)}
11node.querySelectorAll('img[data-copyright], img[data-alt]').forEach(initImage)})})});observer.observe(document.body,{childList:!0,subtree:!0})})()

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.