This commit is contained in:
Brychan Dempsey 2021-06-05 20:07:44 +12:00
parent 1e31bbaa75
commit 35caf24749

View File

@ -1,11 +1,11 @@
<head> <head>
<script> <script>
var docframe = document.getElementById("docFrame").contentWindow.document.body.innerHTML; var x = document.getElementById("docFrame");
console.log(docframe); var y = (x.contentWindow || x.contentDocument);
alert("Content: \n" + docframe); if (y.document)y = y.document;
var targetContent = docframe.querySelector(".file-view");
docframe.getElementsByTagName('body')[0].innerHTML = targetContent.innerHTML;
console.log(y.body.innerHTML);
</script> </script>
</head> </head>