showNotification function

Last updated: 2026-03-05T10:53:28.853Z

Metrics

LOC: 29 Complexity: 2 Params: 1

Signature

showNotification(text: string): : void

Source Code

function showNotification(text: string): void {
  const existing = document.getElementById("fill-all-notification");
  if (existing) existing.remove();

  const el = document.createElement("div");
  el.id = "fill-all-notification";
  el.textContent = text;
  Object.assign(el.style, {
    position: "fixed",
    bottom: "20px",
    right: "20px",
    padding: "12px 20px",
    background: "#4F46E5",
    color: "#fff",
    borderRadius: "8px",
    fontSize: "14px",
    fontFamily: "system-ui, sans-serif",
    zIndex: "999999",
    boxShadow: "0 4px 12px rgba(0,0,0,0.15)",
    transition: "opacity 0.3s ease",
  });

  document.body.appendChild(el);

  setTimeout(() => {
    el.style.opacity = "0";
    setTimeout(() => el.remove(), 300);
  }, 3000);
}

No outgoing dependencies.

Impact (Incoming)

graph LR showNotification["showNotification"] handleContentMessage["handleContentMessage"] initContentScript["initContentScript"] handleContentMessage -->|calls| showNotification initContentScript -->|calls| showNotification style showNotification fill:#dbeafe,stroke:#2563eb,stroke-width:2px click showNotification "8c9f4b84bc123ccf.html" click handleContentMessage "25741f17eec7ff33.html" click initContentScript "9e3cc66103159cb7.html"
SourceType
handleContentMessage calls
initContentScript calls