mirror of
https://github.com/kkapsner/CanvasBlocker
synced 2025-07-03 20:16:33 +02:00
parent
7178b409c3
commit
1125d6f1a8
13 changed files with 31 additions and 13 deletions
|
@ -6,6 +6,7 @@
|
|||
<title>iFrame Test</title>
|
||||
<link href="testIcon.svg" type="image/png" rel="icon">
|
||||
<link href="testIcon.svg" type="image/png" rel="shortcut icon">
|
||||
<link rel="stylesheet" href="../default.css" type="text/css">
|
||||
</head>
|
||||
<body>
|
||||
<div id="text">
|
||||
|
@ -22,14 +23,12 @@
|
|||
<script src="iframeTest.js"></script>
|
||||
<iframe></iframe><script>
|
||||
const pageText = document.getElementById("text").innerHTML;
|
||||
const pageTitle = document.querySelector("head title").textContent;
|
||||
const headHTML = document.querySelector("head").innerHTML;
|
||||
function restoreContent(){
|
||||
"use strict";
|
||||
|
||||
document.body.innerHTML = pageText;
|
||||
const title = document.createElement("title");
|
||||
title.textContent = pageTitle;
|
||||
document.getElementsByTagName("head")[0].appendChild(title);
|
||||
document.getElementsByTagName("head")[0].innerHTML = headHTML;
|
||||
}
|
||||
|
||||
const iframe = window[0];
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue