|
<!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() { |
|
|
|
var iframe = document.getElementById('myIframe'); |
|
|
|
|
|
if (iframe.contentDocument) { |
|
|
|
var iframeDoc = iframe.contentDocument || iframe.contentWindow.document; |
|
|
|
|
|
var textToRemove = "nerijs/pixel-art-xl"; |
|
var iframeContent = iframeDoc.body.innerHTML; |
|
var modifiedContent = iframeContent.replace(new RegExp(textToRemove, 'g'), ''); |
|
|
|
|
|
iframeDoc.body.innerHTML = modifiedContent; |
|
} else { |
|
console.error('Cannot access content inside the iframe due to cross-origin restrictions.'); |
|
} |
|
} |
|
</script> |
|
|
|
</body> |
|
</html> |
|
|