quack1 / index.html
oldfart's picture
Update index.html
5e2a3f3
raw
history blame contribute delete
No virus
1.21 kB
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Modify Iframe Content</title>
</head>
<body>
<iframe
id="myIframe"
src="https://oldfart-pixl.hf.space"
frameborder="0"
width="850"
height="450"
onload="removeTextFromIframe();"
></iframe>
<script>
function removeTextFromIframe() {
// Get the iframe element
var iframe = document.getElementById('myIframe');
// Check if the content inside the iframe is from the same origin
if (iframe.contentDocument) {
// Access the document inside the iframe
var iframeDoc = iframe.contentDocument || iframe.contentWindow.document;
// Modify the content as needed
var textToRemove = "nerijs/pixel-art-xl";
var iframeContent = iframeDoc.body.innerHTML;
var modifiedContent = iframeContent.replace(new RegExp(textToRemove, 'g'), '');
// Update the content inside the iframe
iframeDoc.body.innerHTML = modifiedContent;
} else {
console.error('Cannot access content inside the iframe due to cross-origin restrictions.');
}
}
</script>
</body>
</html>