PageSourceSearch

https://www.dimosxiromerou.gr/wp-content/plugins/search-ai-plugin/assets/script.js

js dimosxiromerou.gr collected 2026-10-02 13:50:58 UTC 3,102 bytes, 108 lines download raw bytes

1const interval = setInterval(() => {
2  const widget = document.getElementById("search-ai-widget-id");
3  if (widget && widget.shadowRoot) {
4    const sr = widget.shadowRoot;
5
6    // cache the nodes we’re going to style
7    const button = sr.querySelector("#submit-button-id");
8    const transitionDiv = sr.querySelector("#transition-div-id");
9    const rightCycle = sr.querySelector(".right-cycle");
10    const upperLine = sr.querySelector(".upper-line");
11    const lowerLine = sr.querySelector(".lower-line");
12    const leftCycle = sr.querySelector(".left-cycle");
13
14    const simpleLabel = sr.querySelector(".simple-text");
15    const aiLabel = sr.querySelector(".ai-text");
16
17    const toggleBtn = sr.querySelector("button.shadow.cursor-pointer");
18    
19    let knobSimple = null;
20    let knobAI = null;
21
22    if (toggleBtn) {
23      const texts = toggleBtn.querySelectorAll("p");
24
25      toggleBtn.style.boxShadow = "0px 0px 2px #000000d9";
26
27      if (texts.length >= 2) {
28        knobSimple = texts[0];
29        knobAI = texts[1];
30      }
31    }
32
33    if (button) {
34      const color = searchAiSettings.color;
35      button.style.backgroundColor = color;
36
37      button.style.marginRight = "1px";
38    }
39
40    const bg = searchAiSettings.bg;
41
42    if (rightCycle) {
43      rightCycle.style.background = bg;
44    }
45
46    if (leftCycle) {
47      leftCycle.style.background = bg;
48    }
49
50    if (lowerLine) {
51      lowerLine.style.background = `radial-gradient(110% 100% at bottom, #0000 50%, ${bg} 51%)`;
52    }
53
54    if (upperLine) {
55      upperLine.style.background = `radial-gradient(110% 100% at top, #0000 50%, ${bg} 51%)`;
56    }
57
58     if (knobSimple) {
59      knobSimple.style.opacity = "0";
60      knobSimple.style.color = "transparent";
61      knobSimple.style.animation = "none";
62    }
63
64    if (knobAI) {
65      knobAI.style.opacity = "0";
66      knobAI.style.color = "transparent";
67      knobAI.style.animation = "none";
68    }
69
70    if (simpleLabel) {
71      simpleLabel.style.color = "#34495F";
72      simpleLabel.style.animation = "none";
73    }
74
75    if (aiLabel) {
76      aiLabel.style.color = "#34495F";
77      aiLabel.style.animation = "none";
78    }
79
80    if (button && transitionDiv) {
81      const color = searchAiSettings.color;
82      button.style.backgroundColor = color;
83
84      window.scrollTo({ top: 20, behavior: "smooth" });
85
86      // Default styles
87      transitionDiv.style.maxWidth = "100%";
88      transitionDiv.style.width = "100%";
89      transitionDiv.style.position = "relative";
90      transitionDiv.style.bottom = "-25px";
91      transitionDiv.style.boxShadow = "2px 2px 5px #000000d9";
92      transitionDiv.style.display = "flex";
93      transitionDiv.style.flexDirection = "column";
94      transitionDiv.style.alignItems = "stretch";
95      transitionDiv.style.justifyContent = "center";
96
97      let section = widget;
98      while (section && section.tagName !== "SECTION") {
99        section = section.parentElement;
100      }
101
102      if (section) {
103        const sectionHeight = section.getBoundingClientRect().height;
104        transitionDiv.style.height = `${sectionHeight * 0.6}px`;
105      }
106    }
107  }
108}, 100);

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.