PageSourceSearch

https://pepeprint.de/theme/ef41fb34541203f550fab36c2343a56d/js/dne…/dne-custom-css-js.js?1790953653

js pepeprint.de collected 2026-10-06 14:18:20 UTC 4,051 bytes, 131 lines download raw bytes

1
2
3//------------------------------------------------------------------------
4// Run only on URLs that contain "druckfreigabe"
5window.addEventListener('load', () => {
6
7    if (!window.location.href.includes("druckfreigabe")) return;
8
9    const materials = [];
10
11    const observer = new MutationObserver(() => {
12        const blocks = document.querySelectorAll('.df-pos-info');
13
14        if (blocks.length > 0) {
15            collectMaterials();
16            console.log("Materials found:", materials);
17            observer.disconnect(); // stop once we collected everything
18        }
19    });
20
21    observer.observe(document.body, {
22        childList: true,
23        subtree: true
24    });
25
26    function collectMaterials() {
27        const labels = document.querySelectorAll('.df-pos-info .lbl');
28
29        for (const label of labels) {
30            if (label.textContent.trim() === 'Material:') {
31                const valueEl = label.nextElementSibling;
32
33                if (valueEl && valueEl.classList.contains('val-black')) {
34                    const raw = valueEl.textContent.trim();             // e.g. "Aluverbund 3mm"
35                    const material = raw.split(/\s+\d/)[0].trim();     // remove thickness
36
37                    // Add only once
38                    if (!materials.includes(material)) {
39                        materials.push(material);
40                    }
41                }
42            }
43        }
44
45        // Loop through materials
46        materials.forEach(material => {
47        
48            if (material == "Aluverbund") {
49                const targetDivs = document.querySelectorAll('.druckfreigabe_montagematerial_aluverbund');
50                targetDivs.forEach(div => {
51                    div.style.display = 'block'; // make it blue
52                });
53            }
54        
55            if (material == "ESG-Glas") {
56                const targetDivs = document.querySelectorAll('.druckfreigabe_montagematerial_esg_glas');
57                targetDivs.forEach(div => {
58                    div.style.display = 'block'; // make it blue
59                });
60            }
61            
62            if (material == "klebefolie 360 blockout permanent" || material == "Fine-Art Folie" || material == "gf e285 weiss pvc extreme supertack" || material == "GF E223 weiß ablösbar") {
63                const targetDivs = document.querySelectorAll('.druckfreigabe_montagematerial_folien');
64                targetDivs.forEach(div => {
65                    div.style.display = 'block'; // make it blue
66                });
67            }
68            
69        });
70    }
71
72});
73document.addEventListener('DOMContentLoaded', () => {
74  // run only on /partner
75  if (!window.location.pathname.startsWith('/partner')) {
76    return;
77  }
78
79  const isMobile = () => window.matchMedia('(max-width: 575.98px)').matches;
80
81  // --- Modal hide ---
82  const applyModalStyles = () => {
83    const modal = document.querySelector(
84      '.neti-store-locator-cookie-consent-modal.modal'
85    );
86
87    if (modal) {
88      modal.style.setProperty('z-index', '1040', 'important');
89    }
90  };
91
92  // --- Search container position ---
93  const applySearchPosition = () => {
94    const search = document.querySelector('.search-container');
95    if (!search) return;
96
97    if (isMobile()) {
98      search.style.setProperty('position', 'static', 'important');
99    } else {
100      search.style.removeProperty('position');
101    }
102  };
103
104  // --- Apply immediately ---
105  applyModalStyles();
106  applySearchPosition();
107
108  // --- Observe DOM mutations to re-apply if plugin/JS changes inline styles ---
109  const observer = new MutationObserver(() => {
110    applyModalStyles();
111    applySearchPosition();
112  });
113
114  observer.observe(document.body, {
115    childList: true,
116    subtree: true,
117    attributes: true,
118    attributeFilter: ['style']
119  });
120
121  // --- Re-apply on resize / orientation change ---
122  window.addEventListener('resize', applySearchPosition);
123});
124
125
126
127
128
129
130
131

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.