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

This commit is contained in:
TristanEDU 2025-05-30 04:47:57 -07:00
parent 99f07458ee
commit deb066111f
2 changed files with 47 additions and 0 deletions

View File

@ -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);
}

View File

@ -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": ["<all_urls>"],
"action": {
"default_title": "Overlay a site"
},
"content_scripts": [
{
"matches": ["<all_urls>"],
"js": ["content.js"]
}
]
}