Spaces:
Running
Running
Update index.html
Browse files16 unmodified lines171819202122231 unmodified line25262728293031323334353637383940412 unmodified lines4445464716 unmodified lines<body><h1>Photo Background Removal Tool By WebTech By Rohit.</h1><div id="container"><label id="upload-button" for="upload"><svg width="25" height="25" viewBox="0 0 25 25" fill="none" xmlns="http://www.w3.org/2000/svg"><path fill="#000"1 unmodified line</path></svg>Click to upload image<label id="example">(or try example)</label></label></div><label id="status"></label><input id="upload" type="file" accept="image/*" /><button id="remove-background-button" onclick="refresh()">Remove Another Photo Background</button><script>function refresh() {window.location.reload(); // Refresh the page}document.getElementById('upload').addEventListener('change', function () {// Show the button when an image is uploaded2 unmodified lines</script></body></html>16 unmodified lines171819202122231 unmodified line2526272829303132333435363738394041424344454647484950515253542 unmodified lines5758596016 unmodified lines<body><h1>Photo Background Removal Tool By WebTech By Rohit.</h1><div id="container" style="background-image: url('path/to/default/image.jpg');"><label id="upload-button" for="upload"><svg width="25" height="25" viewBox="0 0 25 25" fill="none" xmlns="http://www.w3.org/2000/svg"><path fill="#000"1 unmodified line</path></svg>Click to upload image</label></div><label id="status"></label><input id="upload" type="file" accept="image/*" /><button id="remove-background-button" onclick="refresh()">Remove Another Photo Background</button><button id="download-button" onclick="downloadBackground()">Download Background Image</button><script>function refresh() {window.location.reload(); // Refresh the page}function downloadBackground() {var container = document.getElementById('container');var backgroundImageUrl = getComputedStyle(container).backgroundImage.slice(5, -2);// Create a temporary anchor elementvar link = document.createElement("a");link.href = backgroundImageUrl;link.download = "background_image.jpg"; // Set the download file namedocument.body.appendChild(link);link.click();document.body.removeChild(link);}document.getElementById('upload').addEventListener('change', function () {// Show the button when an image is uploaded2 unmodified lines</script></body></html>
index.html+16-3