PageSourceSearch

https://shop.erf.de/js/script.js

js erf.de collected 2026-09-24 09:23:30 UTC 1,734 bytes, 54 lines download raw bytes

1/**
2 * Google Analytics - outgoing links.
3 */
4
5function recordOutboundLink(link, category, action) {
6    try {
7        var myTracker = _gat._getTrackerByName();
8        _gaq.push(['myTracker._trackEvent', category , action ]);
9        if (link.target == '_blank')
10            setTimeout('window.open("' + link.href + '", "_blank");', 100);
11        else
12            setTimeout('document.location = "' + link.href + '"', 100);
13    }catch(err){}
14}
15
16/**
17 * Viewport height fix for mobile browsers.
18 *
19 * Mobile browsers subtract the address bar from 100vh inconsistently.
20 * We set --vh and --vvh on :root so CSS can use calc(var(--vh) * 100)
21 * instead of 100vh.
22 *
23 *   --vh  : 1/100 of window.innerHeight  (layout viewport)
24 *   --vvh : 1/100 of visualViewport.height (visible area, shrinks when keyboard opens)
25 *   --vvot: visualViewport.offsetTop (non-zero when page is zoomed/scrolled)
26 */
27(function () {
28    var root = document.documentElement;
29
30    function setVh() {
31        root.style.setProperty('--vh', (window.innerHeight * 0.01) + 'px');
32        if (window.visualViewport) {
33            root.style.setProperty('--vvh', (window.visualViewport.height * 0.01) + 'px');
34        }
35    }
36
37    function setVvot() {
38        if (window.visualViewport) {
39            var offset = window.visualViewport.height === window.innerHeight
40                ? 0
41                : window.visualViewport.offsetTop;
42            root.style.setProperty('--vvot', offset + 'px');
43        }
44    }
45
46    setVh();
47    setVvot();
48
49    window.addEventListener('resize', setVh);
50    if (window.visualViewport) {
51        window.visualViewport.addEventListener('resize', setVh);
52        window.visualViewport.addEventListener('scroll', setVvot);
53    }
54}());

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.