PageSourceSearch

https://928-porscheclub.fr/PorscheClubs/pc_admin.nsf/dist2023/js/custom-porsche-design-system.js

js 928-porscheclub.fr collected 2026-10-09 23:39:32 UTC 1,368 bytes, 46 lines download raw bytes

1$(function () {
2  porscheDesignSystem.load();
3});
4
5const initPDSCarouselWithBoxShadow = async () => {
6  const carousels = document.querySelectorAll(".pds-carousel.with-box-shadow");
7  await porscheDesignSystem.componentsReady(carousels);
8  carousels.forEach((carousel) => {
9    addShadowRootStyle(carousel, "#splide { padding: 40px; margin: -40px; }");
10  });
11};
12
13var idCount = 0;
14var retryCounter = 0;
15function addShadowRootStyle(element, styleContent) {
16  idCount++;
17  let style = document.createElement("style");
18  style.id = "porsche-custom-style-" + idCount;
19  style.innerHTML = styleContent;
20  if (element && element.shadowRoot) {
21    element.shadowRoot.appendChild(style);
22  } else if (element && !element.shadowRoot && retryCounter <= 4) {
23    // due to shadow root (in newer jQuery Versions)
24    setTimeout(() => {
25      addShadowRootStyle(element, styleContent);
26      retryCounter++;
27    }, 50);
28  }
29  return style.id;
30}
31
32function removeShadowRootStyle(element, selector) {
33  const styles = element.shadowRoot.querySelectorAll(selector);
34  styles.forEach((style) => {
35    style.parentNode?.removeChild(style);
36  });
37}
38
39function initPDSAccordion() {
40  const accordions = document.querySelectorAll("p-accordion");
41  accordions.forEach((accordion) =>
42    accordion.addEventListener("accordionChange", (e) => {
43      e.target.open = e.detail.open;
44    })
45  );
46}

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.