Developers
Zodi
Beta
Plus
· bearbeitet

Gepostet in Developers

Parqet Design und Animations Extension

Liebe Community,

ich habe ein Browser Add-On gevibecoded, das Parqet um verschiedene Design-Sprachen und Animationen ergänzt.

Addon-Code unten in den Kommentaren.

Das Add-On bietet neben dem Standard-View noch die Designs "Neon Glow", "Terminal", "Blueprint" und "Matrix".

Daneben ergänzt es Animationen wie den Count-Up der Depotwerte beim Refresh, reaktionen beim Hovern über Elemente und ein paar weitere kleine Animationen. (Ich hoffe, dass das GIF unten funktioniert)

Außerdem rein kosmetisch, da ich Parqet oft länger nebenher aufhabe ein "Live"-Kurs, der sich jede Sekunde mit einem kleinen Graph aktualisiert und eine zufällige Veränderung im Bereich von 0,1% des Depotwertes pingt. Dabei springt der Depotwert wie beim Broker grün oder rot und es wird ein Demograph daneben gezeichnet, sodass man nebenher einen visuellen Effekt hat.

Hier sind die Screenshots:

Bildschirmfoto 2026-11-25 um 11.32.55.png

Bildschirmfoto 2026-11-25 um 11.16.56.png

Bildschirmfoto 2026-11-25 um 11.17.07.png

Bildschirmfoto 2026-11-25 um 11.17.21.png

Bildschirmfoto 2026-11-25 um 11.17.38.png

Hier das Menü, das unten auf der Seite hinzugefügt wird:

Bildschirmfoto 2026-11-25 um 11.18.17.png

Bildschirmfoto 2026-11-25 um 11.18.32.png

Hier weitere Seiten (beispielhaft im Terminal Design):

Bildschirmfoto 2026-11-25 um 11.18.57.png

Bildschirmfoto 2026-11-25 um 11.19.25.png

Count-Up und kosmetischer Live Wert (not sure, ob das Gif funktioniert):

Bildschirmaufnahme 2026-11-25 um 11.19.34.gif

Viel Spaß damit!

3
3

3 Kommentare

Melde dich an, um mitzudiskutieren.
Zodi
Autor
Beta
Plus

manifest.json:

	
manifest_version	2
name	"Parqet Satisfying"
version	"4.5"
description	"Animationen, lokale Demo-Simulation und Looks: Standard, Neon Glow, Terminal, Blueprint, Matrix."
browser_specific_settings	
gecko	
id	"parqet-satisfying@local"
content_scripts	
0	
matches	
0	"*://*.parqet.com/*"
css	
0	"animations.css"
js	
0	"animations.js"
run_at	"document_start"
1
Zodi
Autor
Beta
Plus

animation.js:

(() => {
  "use strict";

  if (document.getElementById("pq-ui")) return;
  const LS_LOOK = "pq-look";
  const LS_COLOR = "pq-color";
  const LOOKS = { default: "Standard", neon: "Neon Glow", terminal: "Terminal", blueprint: "Blueprint", matrix: "Matrix" };
  const DOTS = { default: "#0084d1", neon: "#00f0ff", terminal: "#ffb000", blueprint: "#5287bd", matrix: "#00ff41" };
  const DURATION = 1400;
  const RE = /^(\s*)([+\-−]?)(\d{1,3}(?:\.\d{3})+|\d+)(?:,(\d+))?(\s*(?:[€%]|x)?\s*)$/;
  const motionQuery=matchMedia("(prefers-reduced-motion: reduce)");
  let reduced=motionQuery.matches;
  let state = new WeakMap();

  const store = {
    get(k) { try { return localStorage.getItem(k); } catch (e) { return null; } },
    set(k, v) { try { localStorage.setItem(k, v); } catch (e) {} },
  };

  /* ---------- Hochzählen ---------- */
  function parse(text, allowPlain) {
    const m = text.match(RE);
    if (!m) return null;
    const hasSymbol = /[€%x]/.test(m[5]);
    if (!allowPlain && !hasSymbol && !m[4] && !m[3].includes(".")) return null;
    const decimals = Math.min(m[4] ? m[4].length : 0,20);
    const value = parseFloat(m[3].replace(/\./g, "") + (m[4] ? "." + m[4] : ""));
    return { lead: m[1], sign: m[2], suffix: m[5], decimals, value };
  }

  function fmt(v, d) {
    return v.toLocaleString("de-DE", { minimumFractionDigits: d, maximumFractionDigits: d });
  }

  function countUp(node) {
    const text = node.nodeValue;
    const s = state.get(node);
    if (s && (s.busy || s.final === text)) return;
    const inHeading = !!(node.parentElement && node.parentElement.closest("h2"));
    const p = parse(text, inHeading);
    if (!p || p.value === 0) { state.set(node, { final: text }); return; }

    const from = s && s.prev !== undefined ? s.prev : 0;
    const st = { busy: true, final: text, prev: p.value, written:text };
    state.set(node, st);
    if (reduced) { st.busy = false; return; }

    const t0 = performance.now();
    const parent = node.parentElement;
    function tick(now) {
      if (!node.isConnected || state.get(node)!==st) return;
      if (node.nodeValue!==st.written) { st.busy=false;countUp(node);return; }
      if (reduced || document.hidden) { node.nodeValue=text;st.busy=false;return; }
      const k = Math.min((now - t0) / DURATION, 1);
      const eased = 1 - Math.pow(1 - k, 4);
      const v = from + (p.value - from) * eased;
      st.written=p.lead+p.sign+fmt(v,p.decimals)+p.suffix;
      node.nodeValue=st.written;
      if (k < 1) requestAnimationFrame(tick);
      else {
        node.nodeValue = text;
        st.busy = false;
        if (parent && parent.closest("header")) {
          parent.classList.remove("pq-flash");
          void parent.offsetWidth;
          parent.classList.add("pq-flash");
        }
      }
    }
    requestAnimationFrame(tick);
  }

  /* ---------- Linien, Zeilen ---------- */
  function drawLines() {
    document.querySelectorAll('svg g[clip-path] path[stroke-linejoin="bevel"]').forEach(p => {
      if (p.closest('#pq-ui,#pq-live')) return;
      // Parqet besitzt SVG-Längen, Strichmuster und Geometrie.
      if (!p.classList.contains('pq-value-line')) p.classList.add('pq-value-line');
    });
  }

  function scan() {
    if (!document.body) return;
    const root = document.querySelector("#__nuxt") || document.body;
    const walker = document.createTreeWalker(root, NodeFilter.SHOW_TEXT);
    const nodes = [];
    while (walker.nextNode()) {
      const n = walker.currentNode;
      const el = n.parentElement;
      if (!el || el.closest("svg, script, style, input, textarea, #pq-ui, #pq-live, #pq-boot")) continue;
      if (RE.test(n.nodeValue)) nodes.push(n);
    }
    nodes.forEach(countUp);
    drawLines();
    document.querySelectorAll("circle.donut-segment").forEach((c, i) => { c.dataset.pqSeg = String(i % 8); });
    recolorPie();

    document.querySelectorAll("tr, li").forEach((el, i) => {
      if(el.closest("#pq-ui,#pq-live") || el.dataset.pqDone) return;
      el.dataset.pqDone = "1";
      if (el.parentElement && el.parentElement.closest("li")) return;
      el.style.animationDelay = (i % 15) * 40 + "ms";
      el.classList.add("pq-pop");
    });
  }

  function replay() {
    state = new WeakMap();
    document.querySelectorAll("[data-pq-done]").forEach((el) => {
      delete el.dataset.pqDone;
      el.classList.remove("pq-pop");
      el.style.animationDelay = "";
    });
    const restart = document.querySelectorAll("main, circle.donut-segment, #activityDropupBtn, .isolate.-space-x-4");
    restart.forEach((el) => { el.style.animation = "none"; });
    void document.body.offsetWidth;
    restart.forEach((el) => { el.style.animation = ""; });
    scan();
  }

  /* ---------- Konfetti ---------- */
  function confetti(x, y) {
    if (reduced) return;
    const colors = ["#10b981", "#0084d1", "#f59e0b", "#ec4899", "#a855f7", "#00ff41"];
    for (let i = 0; i < 48; i++) {
      const p = document.createElement("i");
      p.className = "pq-confetti";
      p.style.left = x + "px";
      p.style.top = y + "px";
      const lk = store.get(LS_LOOK);
      const glyphs = lk === "matrix" ? "01アイウエオABCDEF" : lk === "terminal" ? "*+#$%&" : null;
      if (glyphs) {
        p.className = "pq-confetti pq-glyph";
        p.textContent = glyphs[Math.floor(Math.random() * glyphs.length)];
        p.style.color = lk === "matrix" ? "#00ff41" : "#ffb000";
      } else {
        p.style.background = colors[i % colors.length];
      }
      document.body.appendChild(p);
      const a = Math.random() * Math.PI * 2;
      const v = 80 + Math.random() * 180;
      const dx = Math.cos(a) * v;
      const dy = Math.sin(a) * v - 120;
      const anim = p.animate(
        [
          { transform: "translate(0,0) rotate(0deg)", opacity: 1 },
          { transform: "translate(" + dx + "px," + (dy + 260) + "px) rotate(" + Math.random() * 720 + "deg)", opacity: 0 },
        ],
        { duration: 1200 + Math.random() * 600, easing: "cubic-bezier(.2,.7,.4,1)" }
      );
      anim.onfinish = () => p.remove();
    }
  }

  document.addEventListener("click", (e) => {
    const t = e.target.closest && e.target.closest('[data-testid="portfolio-value"]');
    if (!t) return;
    confetti(e.clientX, e.clientY);
    const w = document.createTreeWalker(t, NodeFilter.SHOW_TEXT);
    while (w.nextNode()) {
      const n = w.currentNode;
      const s = state.get(n);
      if (s && s.busy) continue;
      state.delete(n);
      countUp(n);
    }
  });

  /* ---------- Matrix-Regen ---------- */
  let rain = null;
  function startRain() {
    if (rain || reduced || !document.body) return;
    const c = document.createElement("canvas");
    c.id = "pq-rain";
    document.body.prepend(c);
    const ctx = c.getContext("2d");
    if(!ctx){c.remove();return;}
    const size = 16;
    const chars = "アイウエオカキクケコサシスセソタチツテト0123456789ABCDEF";
    let w = 0, h = 0, cols = 0, drops = [], last = 0;
    function resize() {
      w = c.width = innerWidth;
      h = c.height = innerHeight;
      cols = Math.floor(w / size);
      drops = Array.from({ length: cols }, () => Math.random() * (h / size));
    }
    function frame(t) {
      if(!rain)return;
      rain.raf = requestAnimationFrame(frame);
      if (t - last < 55) return;
      last = t;
      ctx.fillStyle = "rgba(0,0,0,0.08)";
      ctx.fillRect(0, 0, w, h);
      ctx.fillStyle = "#00ff41";
      ctx.font = size + "px monospace";
      for (let i = 0; i < cols; i++) {
        const ch = chars[Math.floor(Math.random() * chars.length)];
        ctx.fillText(ch, i * size, drops[i] * size);
        if (drops[i] * size > h && Math.random() > 0.975) drops[i] = 0;
        drops[i]++;
      }
    }
    resize();
    addEventListener("resize", resize);
    rain = { c, resize, raf: requestAnimationFrame(frame) };
  }
  function stopRain() {
    if (!rain) return;
    cancelAnimationFrame(rain.raf);
    removeEventListener("resize", rain.resize);
    rain.c.remove();
    rain = null;
  }
  function syncRain() {
    if (!document.hidden && document.documentElement.getAttribute("data-pq-look")==="matrix") startRain();
    else stopRain();
  }

  /* ---------- Designs & Dunkelmodus ---------- */
  function applyLook(name, animate) {
    if (!LOOKS[name]) name = "default";
    store.set(LS_LOOK, name);
    const h = document.documentElement;
    if (animate) {
      h.classList.add("pq-switching");
      setTimeout(() => h.classList.remove("pq-switching"), 650);
    }
    if (name === "default") h.removeAttribute("data-pq-look");
    else h.setAttribute("data-pq-look", name);
    syncRain();
    updateUi();
    recolorPie();
  }

  function applyColor(mode) {
    store.set(LS_COLOR, mode);
    const h = document.documentElement;
    h.classList.remove(mode === "dark" ? "light" : "dark");
    h.classList.add(mode);
    updateUi();
    recolorPie();
  }

  function enforceColor() {
    const mode = store.get(LS_COLOR);
    if (mode!=="dark" && mode!=="light") return;
    const h = document.documentElement;
    const other = mode === "dark" ? "light" : "dark";
    if (!h.classList.contains(mode) || h.classList.contains(other)) {
      h.classList.remove(other);
      h.classList.add(mode);
    }
  }

  /* ---------- Bedienfeld ---------- */
  function updateUi() {
    const look = store.get(LS_LOOK) || "default";
    const label = document.getElementById("pq-ui-look-label");
    const lookLabel=LOOKS[look]||LOOKS.default;
    if(label && label.textContent!==lookLabel) label.textContent=lookLabel;
    document.querySelectorAll("#pq-ui-menu li").forEach((li) => {
      li.setAttribute("aria-selected", String(li.dataset.look === look));
    });
    const cb = document.getElementById("pq-ui-color");
    if (cb) {
      const dark = document.documentElement.classList.contains("dark");
      const icon=dark?"☀":"☾";
      if(cb.textContent!==icon) cb.textContent=icon;
      const canToggleColor = look === "default";
      cb.disabled = !canToggleColor;
      cb.title = !canToggleColor ? "Hell/Dunkel nur im Standard-Design" : dark ? "Hellmodus" : "Dunkelmodus";
    }
  }

  function buildUi() {
    if (document.getElementById("pq-ui")) return;
    const ui = document.createElement("div");
    ui.id = "pq-ui";

    const replayBtn = document.createElement("button");
    replayBtn.id = "pq-ui-replay";
    replayBtn.type = "button";
    replayBtn.title = "Animationen erneut abspielen";
    replayBtn.textContent = "↻";
    replayBtn.addEventListener("click", replay);

    const colorBtn = document.createElement("button");
    colorBtn.id = "pq-ui-color";
    colorBtn.type = "button";
    colorBtn.addEventListener("click", () => {
      const dark = document.documentElement.classList.contains("dark");
      applyColor(dark ? "light" : "dark");
    });

    const wrap = document.createElement("div");
    wrap.id = "pq-ui-look";
    const lookBtn = document.createElement("button");
    lookBtn.id = "pq-ui-look-btn";
    lookBtn.type = "button";
    lookBtn.setAttribute("aria-haspopup", "listbox");
    lookBtn.setAttribute("aria-expanded", "false");
    lookBtn.innerHTML = '<span>🎨</span> <span id="pq-ui-look-label"></span> <span>▾</span>';

    const menu = document.createElement("ul");
    menu.id = "pq-ui-menu";
    menu.setAttribute("role", "listbox");
    menu.hidden = true;
    Object.keys(LOOKS).forEach((key) => {
      const li = document.createElement("li");
      li.dataset.look = key;
      li.setAttribute("role", "option");
      li.tabIndex = 0;
      const dot = document.createElement("span");
      dot.className = "pq-dot";
      dot.style.background = DOTS[key];
      li.appendChild(dot);
      li.appendChild(document.createTextNode(" " + LOOKS[key]));
      li.addEventListener("mouseenter", () => previewLook(key));
      const choose = () => { applyLook(key, true); closeMenu(); lookBtn.focus(); };
      li.addEventListener("click", choose);
      li.addEventListener("keydown", (e) => {
        if (e.key === "Enter" || e.key === " ") { e.preventDefault(); choose(); }
      });
      menu.appendChild(li);
    });

    menu.addEventListener("mouseleave", endPreview);
    function closeMenu() {
      menu.hidden = true;
      endPreview();
      lookBtn.setAttribute("aria-expanded", "false");
    }
    lookBtn.addEventListener("click", (e) => {
      e.stopPropagation();
      menu.hidden = !menu.hidden;
      lookBtn.setAttribute("aria-expanded", String(!menu.hidden));
    });
    document.addEventListener("click", closeMenu);
    document.addEventListener("keydown", (e) => { if (e.key === "Escape") closeMenu(); });

    wrap.appendChild(lookBtn);
    wrap.appendChild(menu);
    ui.appendChild(replayBtn);
    ui.appendChild(colorBtn);
    ui.appendChild(wrap);
    document.body.appendChild(ui);
    updateUi();
  }

  /* ---------- Design-Vorschau ---------- */
  function previewLook(name) {
    const h = document.documentElement;
    if (name === "default") h.removeAttribute("data-pq-look");
    else h.setAttribute("data-pq-look", name);
    recolorPie();
  }
  function endPreview() {
    const cur = store.get(LS_LOOK) || "default";
    const h = document.documentElement;
    if (cur === "default") { if (h.hasAttribute("data-pq-look")) { h.removeAttribute("data-pq-look"); recolorPie(); } }
    else if (h.getAttribute("data-pq-look") !== cur) { h.setAttribute("data-pq-look", cur); recolorPie(); }
  }

  /* ---------- Tastenkürzel ---------- */
  document.addEventListener("keydown", (e) => {
    if (e.ctrlKey || e.metaKey || e.altKey) return;
    const t = e.target;
    if (t && (t.isContentEditable || /^(INPUT|TEXTAREA|SELECT)$/.test(t.tagName))) return;
    const keys = Object.keys(LOOKS);
    if (/^[1-9]$/.test(e.key) && keys[Number(e.key) - 1]) applyLook(keys[Number(e.key) - 1], true);
    else if (e.key === "r" || e.key === "R") replay();
  });

  /* ---------- Boot-Bildschirm (Terminal / Matrix) ---------- */
  function bootScreen() {
    const look = store.get(LS_LOOK);
    if (reduced || (look !== "terminal" && look !== "matrix") || document.getElementById("pq-boot")) return;
    const box = document.createElement("div");
    box.id = "pq-boot";
    const pre = document.createElement("pre");
    box.appendChild(pre);
    document.body.appendChild(box);
    const lines = ["> Initialisiere lokale Ansicht ...", "> Lade Darstellung ... OK", "> Lade Portfolio ... OK", "> Demo-Simulation bereit ... OK"];
    let i = 0;
    const timer = setInterval(() => {
      pre.textContent += (i ? "\n" : "") + lines[i++];
      if (i >= lines.length) clearInterval(timer);
    }, 330);
    setTimeout(() => { clearInterval(timer); box.remove(); }, 1950);
  }

  /* ---------- Kreisdiagramm (SVG-Pfade) einfärben ---------- */
  const pieOriginals = new WeakMap();
  function recolorPie() {
    if (!document.body) return;
    const look = document.documentElement.getAttribute("data-pq-look") || "default";
    const cs = getComputedStyle(document.documentElement);
    document.querySelectorAll("svg").forEach((svg) => {
      if (svg.closest("#pq-ui, #pq-live")) return;
      const paths = Array.from(svg.querySelectorAll("path")).filter((p) => {
        const d = p.getAttribute("d") || "";
        const f = p.dataset.pqFill || p.getAttribute("fill") || "";
        return /[Aa]/.test(d) && /[Zz]\s*$/.test(d.trim()) && !p.closest("g[clip-path]") && f && f !== "none" && f !== "transparent" && !/^url|currentColor/i.test(f);
      });
      if (paths.length < 2) return;
      if (svg.querySelector('g[clip-path] path[stroke-linejoin="bevel"]')) return;
      if (svg.getBoundingClientRect().width < 100) return;
      paths.forEach((p, i) => {
        if (!pieOriginals.has(p)) pieOriginals.set(p,{fill:p.style.getPropertyValue('fill'),priority:p.style.getPropertyPriority('fill')});
        if (!p.dataset.pqFill) p.dataset.pqFill = p.getAttribute("fill");
        p.classList.add("pq-seg");
        if (look === "default") {
          const orig=pieOriginals.get(p);
          if(orig.fill) p.style.setProperty('fill',orig.fill,orig.priority);
          else p.style.removeProperty('fill');
          p.style.setProperty("--pq-c", p.dataset.pqFill);
        } else {
          const c = cs.getPropertyValue("--pq-p" + (i % 8)).trim();
          if (c) { p.style.setProperty("fill", c, "important"); p.style.setProperty("--pq-c", c); }
        }
      });
      svg.classList.add("pq-pie");
      if (!svg.dataset.pqIntro) {
        svg.dataset.pqIntro = "1";
        if (!reduced) {
          svg.classList.add("pq-pie-intro");
          svg.addEventListener("animationend", (e) => { if (e.target === svg) svg.classList.remove("pq-pie-intro"); });
        }
      }
    });
  }

  /* ---------- Pseudo-Live-Wert ---------- */
  const LIVE_RANGE = 0.0005;
  let liveOffset = 0;
  let prevOffset = 0;
  const liveHist = [];
  let liveReference=null;
  const live = new WeakMap();

  function parseDe(text) {
    const m = text.match(/^(\s*)([+\-−]?)(\d{1,3}(?:\.\d{3})*|\d+)(?:,(\d+))?(\s*€\s*)$/);
    if (!m) return null;
    return {
      lead: m[1], sign: m[2], suffix: m[5],
      decimals: Math.min(m[4] ? m[4].length : 0,20),
      value: parseFloat(m[3].replace(/\./g, "") + (m[4] ? "." + m[4] : "")),
    };
  }

  function ensureLiveBox(anchor) {
    let box = document.getElementById("pq-live");
    if (box && box.previousElementSibling === anchor) return box;
    if (box) box.remove();
    box = document.createElement("span");
    box.id = "pq-live";
    box.title="Lokale Demo-Simulation; keine echten Live-Kurse (max. ±0,05 %).";
    const dot = document.createElement("span");
    dot.className = "pq-live-dot";
    const tag = document.createElement("span");
    tag.className = "pq-live-tag";
    tag.appendChild(document.createTextNode("DEMO"));
    const delta = document.createElement("span");
    delta.className = "pq-delta";
    const txt = document.createTextNode("");
    delta.appendChild(txt);
    const NS = "http://www.w3.org/2000/svg";
    const svg = document.createElementNS(NS, "svg");
    svg.setAttribute("viewBox", "0 0 72 20");
    const line = document.createElementNS(NS, "polyline");
    svg.appendChild(line);
    box.appendChild(dot);
    box.appendChild(tag);
    box.appendChild(delta);
    box.appendChild(svg);
    box._r = { delta, txt, line };
    anchor.insertAdjacentElement("afterend", box);
    return box;
  }

  function updateLiveBox(anchor, ref) {
    const box = ensureLiveBox(anchor);
    const r = box._r;
    const up = liveOffset >= 0;
    const sgn = up ? "+" : "−";
    const d = Math.abs(ref * liveOffset);
    const pct = Math.abs(liveOffset * 100);
    r.txt.nodeValue = (up ? "▲ " : "▼ ") + sgn + fmt(d, 0) + " € (" + sgn + fmt(pct, 2) + " %)";
    r.delta.className = "pq-delta " + (up ? "up" : "down");
    liveHist.push(liveOffset);
    if (liveHist.length > 60) liveHist.shift();
    const n = Math.max(liveHist.length - 1, 1);
    r.line.setAttribute("points", liveHist.map((v, i) =>
      (i * 72 / n).toFixed(1) + "," + (10 - (v / LIVE_RANGE) * 8).toFixed(1)).join(" "));
  }

  function flashTick(el) {
    const dirUp = liveOffset >= prevOffset;
    el.classList.remove("pq-tick-up", "pq-tick-down");
    void el.offsetWidth;
    el.classList.add(dirUp ? "pq-tick-up" : "pq-tick-down");
  }

  function liveTick() {
    if (!document.body || document.hidden) return;
    const root = document.querySelector("#__nuxt") || document.body;
    const w = document.createTreeWalker(root, NodeFilter.SHOW_TEXT);
    const items = [];
    while (w.nextNode()) {
      const n = w.currentNode;
      const el = n.parentElement;
      if (!el || el.closest("script, style, input, textarea, #pq-ui, #pq-live, #pq-boot")) continue;
      if (!el.closest('[data-testid="portfolio-value"],svg.pq-pie,svg:has(circle.donut-segment)')) continue;
      if (!/€\s*$/.test(n.nodeValue)) continue;
      const s = state.get(n);
      if (s && s.busy) continue;
      let l = live.get(n);
      if (!l || n.nodeValue !== l.written) {
        const p = parseDe(n.nodeValue);
        if (!p || p.value === 0) continue;
        l = { base: p, written: n.nodeValue };
        live.set(n, l);
      }
      items.push({ n, l, el: el.closest('[data-testid="portfolio-value"]') });
    }
    if (!items.length) return;
    const pv = items.find((it) => it.el);
    if(!pv)return;
    const ref=pv.l.base.value;
    if(liveReference!==ref){liveReference=ref;liveOffset=0;prevOffset=0;liveHist.length=0;}

    prevOffset = liveOffset;
    liveOffset += (Math.random() - 0.5) * LIVE_RANGE * 0.6;
    liveOffset = Math.max(-LIVE_RANGE, Math.min(LIVE_RANGE, liveOffset));

    items.forEach(({ n, l, el }) => {
      const b = l.base;
      if (Math.abs(b.value-ref)>Math.max(1,ref*0.00001)) return;
      const text = b.lead + b.sign + fmt(b.value * (1 + liveOffset), b.decimals) + b.suffix;
      l.written = text;
      state.set(n, { final: text, prev: b.value });
      n.nodeValue = text;
      if (el) flashTick(el);
    });
    if (pv && pv.el) updateLiveBox(pv.el, ref);
  }
  setInterval(liveTick, 1000);

  /* ---------- Start ---------- */
  const savedLook = store.get(LS_LOOK);
  if (savedLook && LOOKS[savedLook] && savedLook !== "default") applyLook(savedLook, false);
  else if (savedLook && !LOOKS[savedLook]) store.set(LS_LOOK, "default");
  enforceColor();
  new MutationObserver(() => { enforceColor(); updateUi(); }).observe(document.documentElement, {
    attributes: true,
    attributeFilter: ["class"],
  });

  function init() {
    buildUi();
    bootScreen();
    syncRain();
    scan();
    let timer = null;
    const owned='#pq-ui,#pq-live,#pq-boot,#pq-rain,.pq-confetti';
    new MutationObserver(records=>{
      const relevant=records.some(r=>{
        const el=r.target.nodeType===1?r.target:r.target.parentElement;
        if(!el || el.closest(owned))return false;
        if(r.type==='characterData'){const s=state.get(r.target);return !s||(!s.busy&&s.final!==r.target.nodeValue);}
        return [...r.addedNodes,...r.removedNodes].some(n=>n.nodeType!==1||!n.matches(owned));
      });
      if(!relevant||timer)return;
      timer=setTimeout(()=>{timer=null;scan();},120);
    }).observe(document.body,{childList:true,characterData:true,subtree:true});
    motionQuery.addEventListener('change',()=>{reduced=motionQuery.matches;syncRain();});
    document.addEventListener('visibilitychange',syncRain);
  }

  if (document.readyState === "loading") document.addEventListener("DOMContentLoaded", init);
  else init();
})();
1
Zodi
Autor
Beta
Plus

animation.css:

/* ===== Keyframes ===== */
@keyframes pq-fade-in { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: translateY(0); } }
@keyframes pq-flash { 0% { filter: brightness(1.6); transform: scale(1.06); } 100% { filter: brightness(1); transform: scale(1); } }
@keyframes pq-glow { 50% { box-shadow: 0 0 10px rgba(16, 185, 129, 0.45); } }
@keyframes pq-shake { 0%, 100% { transform: translateX(0); } 25% { transform: translateX(-3px); } 75% { transform: translateX(3px); } }
@keyframes pq-donut { from { stroke-dasharray: 0 100; } }
@keyframes pq-reveal { from { clip-path: inset(0 100% 0 0); } to { clip-path: inset(0 0 0 0); } }
@keyframes pq-bounce-in {
  0% { transform: translateY(80px) scale(0.6); opacity: 0; }
  70% { transform: translateY(-8px) scale(1.05); opacity: 1; }
  100% { transform: translateY(0) scale(1); }
}
@keyframes pq-menu-in { from { opacity: 0; transform: translateY(6px) scale(0.96); } to { opacity: 1; transform: none; } }
@keyframes pq-blink { 50% { opacity: 0; } }
@keyframes pq-neon-pulse { 50% { box-shadow: 0 0 0 1px rgba(0,240,255,.8), 0 0 30px rgba(0,240,255,.35), 0 0 60px rgba(255,43,214,.22); } }

/* ===== Basis-Animationen ===== */
main { animation: pq-fade-in 0.6s ease-out; }
.pq-pop { animation: pq-fade-in 0.5s ease-out both; }
.pq-flash { animation: pq-flash 0.6s ease-out; }
circle.donut-segment { animation: pq-donut 1.2s cubic-bezier(0.2, 0.8, 0.2, 1) 0.4s backwards; }

button:active { transform: scale(0.96); }

.gap-y-20 [data-slot="root"].shadow-md { transition: transform 0.25s ease, box-shadow 0.25s ease; }
.gap-y-20 [data-slot="root"].shadow-md:hover { transform: translateY(-4px); box-shadow: 0 14px 30px rgba(0, 0, 0, 0.18); }

nav[aria-label="Sidebar"] a { transition: transform 0.2s ease, background-color 0.2s ease; }
nav[aria-label="Sidebar"] a:hover { transform: translateX(4px); }

.tw-scope-returns-table tbody tr { transition: background-color 0.2s ease; }
.tw-scope-returns-table tbody tr:hover { background-color: rgba(0, 132, 209, 0.07); }
.tw-scope-holdings-list-row > td { transition: background-image 0.2s ease; }
.tw-scope-holdings-list-row:hover > td { background-image: linear-gradient(rgba(0, 132, 209, 0.08), rgba(0, 132, 209, 0.08)); }

.logo-container img { transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1); }
li:hover .logo-container img, tr:hover .logo-container img { transform: scale(1.18) rotate(-5deg); }
td > div.rounded-full.size-8 { transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1); }
tr:hover > td > div.rounded-full.size-8 { transform: scale(1.15); }

button[aria-label="Aktionen"] .iconify { transition: transform 0.3s ease; }
button[aria-label="Aktionen"]:hover .iconify { transform: rotate(90deg); }

[data-testid="delta-percent-badge"][class*="text-positive"] { animation: pq-glow 3s ease-in-out 1.4s infinite; }
[data-testid="delta-percent-badge"][class*="text-negative"] { animation: pq-shake 0.5s ease-in-out 1.4s 1, pq-glow-neg 3s ease-in-out 2s infinite; }

.isolate.-space-x-4 { animation: pq-reveal 1s ease-out; }
.isolate.-space-x-4 > figure { transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1); }
.isolate.-space-x-4 > figure:hover { transform: translateY(-6px) scale(1.2); z-index: 9999 !important; }

#activityDropupBtn { animation: pq-bounce-in 0.7s ease-out 0.8s backwards; transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1); }
#activityDropupBtn:hover { transform: scale(1.1); }
#activityDropupBtn:active { transform: scale(0.94); }

[data-testid="portfolio-value"] { cursor: pointer; }

.pq-confetti { position: fixed; width: 8px; height: 12px; z-index: 99999; pointer-events: none; border-radius: 2px; }

/* ===== Bedien-Panel ===== */
#pq-ui { position: fixed; right: 20px; bottom: 96px; z-index: 60; display: flex; gap: 8px; align-items: center; font: 500 13px/1 system-ui, -apple-system, sans-serif; }
@media (min-width: 640px) { #pq-ui { right: 40px; bottom: 104px; } }
#pq-ui button {
  cursor: pointer; font: inherit; padding: 8px 10px; border-radius: 10px;
  border: 1px solid rgba(128, 128, 128, 0.35); background: rgba(255, 255, 255, 0.92); color: #1f2937;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.15); backdrop-filter: blur(6px);
  transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.2s ease;
}
html.dark #pq-ui button { background: rgba(31, 41, 55, 0.92); color: #f3f4f6; }
#pq-ui button:hover:not(:disabled) { transform: translateY(-2px) scale(1.06); }
#pq-ui button:disabled { opacity: 0.4; cursor: not-allowed; }
#pq-ui-look { position: relative; }
#pq-ui-menu {
  position: absolute; right: 0; bottom: calc(100% + 8px); list-style: none; margin: 0; padding: 6px; min-width: 170px;
  border-radius: 12px; border: 1px solid rgba(128, 128, 128, 0.35); background: rgba(255, 255, 255, 0.97); color: #1f2937;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25); transform-origin: bottom right; animation: pq-menu-in 0.18s ease-out;
}
html.dark #pq-ui-menu { background: rgba(17, 24, 39, 0.97); color: #f3f4f6; }
#pq-ui-menu[hidden] { display: none; }
#pq-ui-menu li { display: flex; align-items: center; gap: 8px; padding: 8px 10px; border-radius: 8px; cursor: pointer; transition: background-color 0.15s ease, transform 0.15s ease; }
#pq-ui-menu li:hover { background: rgba(128, 128, 128, 0.18); transform: translateX(3px); }
#pq-ui-menu li[aria-selected="true"]::after { content: "✓"; margin-left: auto; }
.pq-dot { width: 10px; height: 10px; border-radius: 50%; display: inline-block; box-shadow: 0 0 8px currentColor; }

/* ===== Look-Wechsel ===== */
html.pq-switching * { transition: background-color 0.5s ease, color 0.5s ease, border-color 0.5s ease, box-shadow 0.5s ease !important; }

/* ===== Gemeinsame Look-Regeln ===== */
html[data-pq-look], html[data-pq-look] body { background: var(--pq-bg) !important; color: var(--pq-text) !important; }
html[data-pq-look] body * { font-family: var(--pq-font) !important; border-color: var(--pq-border) !important; --tw-ring-color: var(--pq-border) !important; }
html[data-pq-look] :is([class*="bg-white"], [class*="bg-gray-"], [class*="bg-default"], [class*="bg-muted"], [class*="bg-elevated"], [class*="bg-accented"]) { background-color: var(--pq-surface) !important; }
html[data-pq-look] .tw-scope-sidebar { background-color: var(--pq-side) !important; }
html[data-pq-look][data-pq-look] main [data-slot="root"].shadow-md { background-color: var(--pq-card) !important; }
html[data-pq-look][data-pq-look] table :is(td, th, tr, thead, tbody) { background-color: transparent !important; }
html[data-pq-look] :is([class*="text-gray-"], [class*="text-default"], [class*="text-highlighted"], [class*="text-toned"], [class*="text-white"], h1, h2) { color: var(--pq-text) !important; }
html[data-pq-look] :is([class*="text-muted"], [class*="text-dimmed"]) { color: var(--pq-muted) !important; }
html[data-pq-look] :is([class*="text-primary"], a:hover) { color: var(--pq-accent) !important; }
html[data-pq-look][data-pq-look] :is([class*="text-positive"]) { color: var(--pq-pos) !important; text-shadow: 0 0 6px color-mix(in srgb, var(--pq-pos) 55%, transparent); }
html[data-pq-look][data-pq-look] :is([class*="text-negative"]) { color: var(--pq-neg) !important; }
html[data-pq-look] [class*="bg-positive"] { background-color: color-mix(in srgb, var(--pq-pos) 16%, transparent) !important; }
html[data-pq-look] [class*="bg-negative"] { background-color: color-mix(in srgb, var(--pq-neg) 16%, transparent) !important; }
html[data-pq-look] [data-testid="portfolio-value"] { text-shadow: 0 0 10px var(--pq-accent); }

html[data-pq-look] svg text[fill="rgb(153,161,175)"] { fill: var(--pq-muted) !important; }
html[data-pq-look] circle.donut-hole { fill: var(--pq-surface) !important; }
html[data-pq-look] circle.donut-segment { stroke: var(--pq-p0) !important; }
html[data-pq-look] circle.donut-segment[data-pq-seg="0"] { stroke: var(--pq-p0) !important; }
html[data-pq-look] circle.donut-segment[data-pq-seg="1"] { stroke: var(--pq-p1) !important; }
html[data-pq-look] circle.donut-segment[data-pq-seg="2"] { stroke: var(--pq-p2) !important; }
html[data-pq-look] circle.donut-segment[data-pq-seg="3"] { stroke: var(--pq-p3) !important; }
html[data-pq-look] circle.donut-segment[data-pq-seg="4"] { stroke: var(--pq-p4) !important; }
html[data-pq-look] circle.donut-segment[data-pq-seg="5"] { stroke: var(--pq-p5) !important; }
html[data-pq-look] circle.donut-segment[data-pq-seg="6"] { stroke: var(--pq-p6) !important; }
html[data-pq-look] circle.donut-segment[data-pq-seg="7"] { stroke: var(--pq-p7) !important; }
html[data-pq-look] #chart-tooltips div[style*="background-color"] { background-color: var(--pq-card) !important; color: var(--pq-text) !important; border-color: var(--pq-accent) !important; }

html[data-pq-look] #pq-ui button, html[data-pq-look] #pq-ui-menu { background: var(--pq-card) !important; color: var(--pq-text) !important; border-color: var(--pq-accent) !important; }

/* ===== Look: Terminal (Amber) ===== */
html[data-pq-look="terminal"] {
  --pq-bg: #0d0b07; --pq-surface: #14100a; --pq-card: #181309; --pq-side: #0a0805;
  --pq-text: #ffd27a; --pq-muted: #a37a2c; --pq-accent: #ffb000; --pq-accent2: #5dff7a;
  --pq-pos: #5dff7a; --pq-neg: #ff5c5c; --pq-border: #3a2d12;
  --pq-p0:#6e5a32; --pq-p1:#856f42; --pq-p2:#574829; --pq-p3:#9c8452; --pq-p4:#4a3f28; --pq-p5:#7a6844; --pq-p6:#635334; --pq-p7:#8f7a4f;
  --pq-font: ui-monospace, "SF Mono", Menlo, Monaco, "Courier New", monospace;
}
html[data-pq-look="terminal"] body *:not(.rounded-full):not(circle) { border-radius: 0 !important; }
html[data-pq-look="terminal"] body::after {
  content: ""; position: fixed; inset: 0; pointer-events: none; z-index: 99998; opacity: 0.35;
  background: repeating-linear-gradient(0deg, rgba(0,0,0,0.25) 0, rgba(0,0,0,0.25) 1px, transparent 1px, transparent 3px);
}
html[data-pq-look="terminal"] header h1::after { content: "▌"; margin-left: 4px; color: var(--pq-accent); animation: pq-blink 1s steps(1) infinite; }
html[data-pq-look="terminal"] main h2::before { content: "$ "; color: var(--pq-accent); }
html[data-pq-look="terminal"] main [data-slot="root"].shadow-md { box-shadow: 0 0 0 1px var(--pq-border), 0 0 18px rgba(255,176,0,0.08) !important; }

/* ===== Look: Neon Glow ===== */
html[data-pq-look="neon"] {
  --pq-bg: #0a0618; --pq-surface: #120a2a; --pq-card: #140b30; --pq-side: #070412;
  --pq-text: #eaf6ff; --pq-muted: #8f86c9; --pq-accent: #00f0ff; --pq-accent2: #ff2bd6;
  --pq-pos: #39ff9c; --pq-neg: #ff3b7a; --pq-border: #2b1d5c;
  --pq-p0:#00f0ff; --pq-p1:#ff2bd6; --pq-p2:#39ff9c; --pq-p3:#b026ff; --pq-p4:#ffe600; --pq-p5:#ff3b7a; --pq-p6:#4d7cff; --pq-p7:#8f86c9;
  --pq-font: "Inter", system-ui, -apple-system, sans-serif;
}
html[data-pq-look="neon"] main [data-slot="root"].shadow-md {
  box-shadow: 0 0 0 1px rgba(0,240,255,.45), 0 0 22px rgba(0,240,255,.18), 0 0 40px rgba(255,43,214,.10) !important;
  animation: pq-neon-pulse 4s ease-in-out infinite;
}
html[data-pq-look="neon"][data-pq-look] :is(header h1, main h2 span) {
  background: linear-gradient(90deg, #00f0ff, #ff2bd6); -webkit-background-clip: text; background-clip: text;
  color: transparent !important; -webkit-text-fill-color: transparent;
}
html[data-pq-look="neon"] x-vue-echarts svg { filter: drop-shadow(0 0 5px rgba(0,240,255,.45)); }
html[data-pq-look="neon"] [data-testid="portfolio-value"] { text-shadow: 0 0 8px #00f0ff, 0 0 26px #ff2bd6; }
html[data-pq-look="neon"] nav[aria-label="Sidebar"] a[aria-current="page"] { box-shadow: inset 0 0 0 1px var(--pq-accent), 0 0 14px rgba(0,240,255,.35); }

/* ===== Look: Matrix ===== */
html[data-pq-look="matrix"] {
  --pq-bg: #000; --pq-surface: rgba(0,14,0,.82); --pq-card: rgba(0,18,0,.86); --pq-side: rgba(0,8,0,.92);
  --pq-text: #7dff9a; --pq-muted: #2fa84f; --pq-accent: #00ff41; --pq-accent2: #b6ff00;
  --pq-pos: #00ff41; --pq-neg: #ff3030; --pq-border: #0b4d1c;
  --pq-p0:#1f522d; --pq-p1:#2d6b3e; --pq-p2:#184224; --pq-p3:#3c7d4d; --pq-p4:#255c34; --pq-p5:#4a8a5a; --pq-p6:#14361d; --pq-p7:#337345;
  --pq-font: ui-monospace, "SF Mono", Menlo, Monaco, "Courier New", monospace;
}
html[data-pq-look="matrix"] #__nuxt { position: relative; z-index: 1; }
#pq-rain { position: fixed; inset: 0; z-index: 0; pointer-events: none; opacity: 0.55; }
html[data-pq-look="matrix"] body *:not(.rounded-full):not(circle) { border-radius: 0 !important; }
html[data-pq-look="matrix"] :is(h1, h2, [data-testid="portfolio-value"], [data-testid="monetary-value"]) { text-shadow: 0 0 8px rgba(0,255,65,.7); }
html[data-pq-look="matrix"] main [data-slot="root"].shadow-md { box-shadow: 0 0 0 1px var(--pq-border), 0 0 16px rgba(0,255,65,.16) !important; }

/* ===== Erweiterungen v3 ===== */
@keyframes pq-glow-neg { 50% { box-shadow: 0 0 10px rgba(239, 68, 68, 0.45); } }
@keyframes pq-tick-up { from { transform: translateY(35%); opacity: .55; color: var(--pq-pos, #10b981); text-shadow: 0 0 14px var(--pq-pos, #10b981); } to { transform: none; opacity: 1; } }
@keyframes pq-tick-down { from { transform: translateY(-35%); opacity: .55; color: var(--pq-neg, #ef4444); text-shadow: 0 0 14px var(--pq-neg, #ef4444); } to { transform: none; opacity: 1; } }
@keyframes pq-live-pulse { 0% { box-shadow: 0 0 0 0 currentColor; opacity: 1; } 70% { box-shadow: 0 0 0 7px transparent; opacity: .6; } 100% { box-shadow: 0 0 0 0 transparent; opacity: 1; } }
@keyframes pq-pie-fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes pq-boot-out { to { opacity: 0; visibility: hidden; } }

.pq-tick-up { display: inline-block; animation: pq-tick-up 0.6s ease-out; }
.pq-tick-down { display: inline-block; animation: pq-tick-down 0.6s ease-out; }

#pq-live { display: inline-flex; align-items: center; gap: 8px; margin-left: 12px; vertical-align: middle; white-space: nowrap; font: 600 12px/1 system-ui, -apple-system, sans-serif; }
.pq-live-dot { width: 8px; height: 8px; border-radius: 50%; background: currentColor; color: var(--pq-pos, #10b981); animation: pq-live-pulse 1.4s ease-out infinite; }
.pq-live-tag { letter-spacing: .1em; font-size: 10px; opacity: .85; color: var(--pq-pos, #10b981); }
.pq-delta { font-variant-numeric: tabular-nums; }
.pq-delta.up { color: var(--pq-pos, #10b981); }
.pq-delta.down { color: var(--pq-neg, #ef4444); }
#pq-live svg { width: 72px; height: 20px; overflow: visible; color: var(--pq-accent, #0084d1); }
#pq-live polyline { fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linejoin: round; stroke-linecap: round; }

.pq-pie-intro { animation: pq-pie-fade 0.8s ease-out both; }
.pq-pie path.pq-seg { transition: opacity 0.2s ease, stroke-width 0.2s ease, filter 0.2s ease; cursor: pointer; stroke-linejoin: round; }
html[data-pq-look] .pq-pie path.pq-seg { stroke: var(--pq-bg) !important; }
.pq-pie:has(path.pq-seg:hover) path.pq-seg:not(:hover) { opacity: 0.45; }
html .pq-pie path.pq-seg:hover, html[data-pq-look] .pq-pie path.pq-seg:hover { stroke: var(--pq-c) !important; stroke-width: 6px !important; }
html[data-pq-look="neon"] .pq-pie path.pq-seg { filter: drop-shadow(0 0 5px var(--pq-c)); }

tbody tr { transition: background-color 0.2s ease, box-shadow 0.2s ease; }
tbody tr:hover { box-shadow: inset 3px 0 0 var(--pq-accent, #0084d1); }
html[data-pq-look] { scrollbar-color: var(--pq-accent) var(--pq-bg); }

.pq-confetti.pq-glyph { width: auto; height: auto; background: none; font: 700 16px/1 ui-monospace, Menlo, monospace; border-radius: 0; }

#pq-boot { position: fixed; inset: 0; z-index: 100001; background: #000; color: var(--pq-accent); display: flex; align-items: center; justify-content: center; font: 14px/1.8 ui-monospace, Menlo, monospace; animation: pq-boot-out 0.35s ease-out 1.5s forwards; }
#pq-boot pre { margin: 0; font: inherit; white-space: pre-wrap; text-shadow: 0 0 8px var(--pq-accent); }

html[data-pq-look="blueprint"] #__nuxt { position: relative; z-index: 1; }

/* ===== Look: Blueprint ===== */
html[data-pq-look="blueprint"] {
  --pq-bg: #0b2a4a; --pq-surface: #0e3560; --pq-card: #103b6a; --pq-side: #082340;
  --pq-text: #e8f3ff; --pq-muted: #8fb4de; --pq-accent: #ffffff; --pq-accent2: #7fd4ff;
  --pq-pos: #8dffb4; --pq-neg: #ff9aa2; --pq-border: #2b5f99;
  --pq-p0:#2c5e91; --pq-p1:#3d72a8; --pq-p2:#224c78; --pq-p3:#5287bd; --pq-p4:#336599; --pq-p5:#689acc; --pq-p6:#1c3f66; --pq-p7:#477bb0;
  --pq-font: "Courier New", ui-monospace, monospace;
}
html[data-pq-look="blueprint"], html[data-pq-look="blueprint"] body {
  background-image: linear-gradient(rgba(255,255,255,.07) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.07) 1px, transparent 1px) !important;
  background-size: 24px 24px !important;
}
html[data-pq-look="blueprint"] main [data-slot="root"].shadow-md { box-shadow: 0 0 0 1px rgba(255,255,255,.5) !important; border-style: dashed !important; }

/* Chart colors only: preserve the renderer's lengths, dashes, opacity and clipping. */
html[data-pq-look] svg path.pq-value-line { stroke:var(--pq-accent) !important; }
html[data-pq-look="matrix"] img[alt="Parqet"] { filter:none !important; }
#pq-ui { max-width:calc(100vw - 24px); flex-wrap:wrap; }
#pq-ui-menu { max-height:65vh; overflow-y:auto; }
#pq-ui :is(button,[role="option"]):focus-visible { outline:2px solid var(--pq-accent,#0084d1);outline-offset:3px; }
@media(prefers-reduced-motion:reduce) { html body *,html body *::before,html body *::after { animation:none !important;transition:none !important; } }
1
🍪

Parqet  nutzt Cookies. Erfahre mehr