diff --git a/src/app/blog/page.tsx b/src/app/blog/page.tsx index ac215bb..dd1b127 100644 --- a/src/app/blog/page.tsx +++ b/src/app/blog/page.tsx @@ -31,10 +31,13 @@ export default function BlogPage() { - element.classList.contains(cls) || element.classList.contains(\`btn-\${cls}\`) + element.classList.contains(cls) || element.classList.contains(`btn-${cls}`) ); if (hasButtonClass && element.textContent && element.textContent.trim().length > 0) { @@ -678,17 +678,17 @@ export default function RootLayout({ const rect = element.getBoundingClientRect(); const overlay = document.createElement('div'); overlay.className = 'webild-hover-overlay'; - overlay.style.cssText = \` + overlay.style.cssText = ` position: fixed !important; - top: \${rect.top - 2}px !important; - left: \${rect.left - 2}px !important; - width: \${rect.width + 4}px !important; - height: \${rect.height + 4}px !important; + top: ${rect.top - 2}px !important; + left: ${rect.left - 2}px !important; + width: ${rect.width + 4}px !important; + height: ${rect.height + 4}px !important; background-color: rgba(90, 113, 230, 0.15) !important; pointer-events: none !important; z-index: 999998 !important; transition: all 0.15s ease !important; - \`; + `; document.body.appendChild(overlay); return overlay; }; @@ -751,11 +751,11 @@ export default function RootLayout({ elementTypeLabel.classList.add('label-bottom'); } - elementTypeLabel.style.cssText = \` - left: \${labelLeft}px !important; - top: \${labelTop}px !important; + elementTypeLabel.style.cssText = ` + left: ${labelLeft}px !important; + top: ${labelTop}px !important; transform: none !important; - \`; + `; }; const removeElementTypeLabel = () => { @@ -1009,7 +1009,7 @@ export default function RootLayout({ const getStorageKey = () => { const url = new URL(window.location.href); const pathParts = url.pathname.split('/').filter(Boolean); - return \`webild-changes-\${pathParts.join('-')}\`; + return `webild-changes-${pathParts.join('-')}`; }; const saveChangeToStorage = (change) => { @@ -1173,7 +1173,7 @@ export default function RootLayout({ window.parent.postMessage({ type: 'webild-text-update-success', - data: { + data: { selector: finalSelector, newValue: newValue } @@ -1245,7 +1245,7 @@ export default function RootLayout({ if (isBackground) { oldValue = window.getComputedStyle(element).backgroundImage; - element.style.backgroundImage = \`url('\${newSrc}')\`; + element.style.backgroundImage = `url('${newSrc}')`; replaced = true; } else if (element.tagName.toLowerCase() === 'img') { oldValue = element.src; @@ -1280,7 +1280,7 @@ export default function RootLayout({ const hasBackgroundImage = window.getComputedStyle(element).backgroundImage !== 'none'; if (hasBackgroundImage) { oldValue = window.getComputedStyle(element).backgroundImage; - element.style.backgroundImage = \`url('\${newSrc}')\`; + element.style.backgroundImage = `url('${newSrc}')`; replaced = true; } } @@ -1396,9 +1396,6 @@ export default function RootLayout({ el.classList.remove(selectedClass); }); - const styleEl = document.getElementById('webild-inspector-styles'); - if (styleEl) styleEl.remove(); - hoveredElement = null; selectedElement = null; }; diff --git a/src/app/page.tsx b/src/app/page.tsx index 76b1a0e..fafd676 100644 --- a/src/app/page.tsx +++ b/src/app/page.tsx @@ -29,10 +29,14 @@ export default function LandingPage() {