From deb066111f00b22c7f2461fc3beda9b7744c700b Mon Sep 17 00:00:00 2001 From: TristanEDU Date: Fri, 30 May 2025 04:47:57 -0700 Subject: [PATCH] initial commit, I pasted in the GPT sugested code for the project. I read it over and as far as I understand JavaScript it should work properly --- content.js | 30 ++++++++++++++++++++++++++++++ manifest.json | 17 +++++++++++++++++ 2 files changed, 47 insertions(+) diff --git a/content.js b/content.js index e69de29..15b6a4e 100644 --- a/content.js +++ b/content.js @@ -0,0 +1,30 @@ +if (!document.getElementById("overlay-iframe")) { + const iframe = document.createElement("iframe"); + iframe.src = "https://hiousa.com"; // Change to your overlay site + iframe.id = "overlay-iframe"; + iframe.style.position = "fixed"; + iframe.style.top = "0"; + iframe.style.left = "0"; + iframe.style.width = "100vw"; + iframe.style.height = "100vh"; + iframe.style.zIndex = "9999"; + iframe.style.pointerEvents = "none"; + iframe.style.opacity = "0.5"; + + const slider = document.createElement("input"); + slider.type = "range"; + slider.min = 0; + slider.max = 100; + slider.value = 50; + slider.style.position = "fixed"; + slider.style.top = "10px"; + slider.style.right = "10px"; + slider.style.zIndex = "10000"; + + slider.oninput = (e) => { + iframe.style.opacity = e.target.value / 100; + }; + + document.body.appendChild(iframe); + document.body.appendChild(slider); +} diff --git a/manifest.json b/manifest.json index e69de29..1afe825 100644 --- a/manifest.json +++ b/manifest.json @@ -0,0 +1,17 @@ +{ + "manifest_version": 3, + "name": "Live Site Overlay Tool", + "version": "1.0", + "description": "Overlay one live site over another for pixel-perfect comparison.", + "permissions": ["scripting", "activeTab"], + "host_permissions": [""], + "action": { + "default_title": "Overlay a site" + }, + "content_scripts": [ + { + "matches": [""], + "js": ["content.js"] + } + ] +}