PageSourceSearch

https://eurzad.szczecin.pl/inc/extlink.js

js eurzad.szczecin.pl collected 2026-10-02 21:29:46 UTC 1,803 bytes, 42 lines download raw bytes

1document.addEventListener("DOMContentLoaded", function () {
2    const links = document.querySelectorAll("a");
3
4    links.forEach(link => {
5      const url = new URL(link.href);
6	    if (link.href.startsWith("http")) { 
7          if (url.origin !== location.origin) {
8              link.title = "Link prowadzi do zewnętrznego serwisu"; 
9              if (!link.querySelector("img")) {
10                link.innerHTML += ' <span class="external-link-icon"><i class="bi bi-box-arrow-up-right align-baseline" aria-hidden="true"></i></span>'; 
11	    }
12           }
13       }
14    });
15});
16
17        document.addEventListener('DOMContentLoaded', function() {
18            const trescElement = document.getElementById('tresc');
19            const progressBar = document.getElementById('progress-bar');
20            const updateProgressBar = () => {
21                if (!trescElement || !progressBar) return;
22
23                const rect = trescElement.getBoundingClientRect();
24                const viewportHeight = window.innerHeight;
25                const scrollableHeight = rect.height - viewportHeight;
26
27                if (scrollableHeight <= 0) {
28                    progressBar.style.width = (rect.top >= 0 && rect.bottom <= viewportHeight) ? '100%' : '0%';
29                    return;
30                }
31
32                const scrolledDistance = -rect.top;
33                const progress = (scrolledDistance / scrollableHeight) * 100;
34                const clampedProgress = Math.max(0, Math.min(100, progress));
35
36                progressBar.style.width = clampedProgress + '%';
37            };
38
39            window.addEventListener('scroll', updateProgressBar);
40            window.addEventListener('resize', updateProgressBar);
41            updateProgressBar();
42        });

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.