From c04c61ae5a5fb5b9858b49b5d128435f80d1fca8 Mon Sep 17 00:00:00 2001 From: JoshyPHP Date: Fri, 1 Mar 2024 23:54:35 +0100 Subject: [PATCH] Added On3 iframe --- iframe/2/on3.html | 18 +++++++----------- iframe/2/on3.min.html | 2 +- 2 files changed, 8 insertions(+), 12 deletions(-) diff --git a/iframe/2/on3.html b/iframe/2/on3.html index 1adf9606..c4348f48 100644 --- a/iframe/2/on3.html +++ b/iframe/2/on3.html @@ -9,7 +9,7 @@ document.body.innerHTML = ``; }; - let height, port; + let port; window.onmessage = (e) => { e.stopImmediatePropagation(); @@ -17,19 +17,15 @@ if (e.data === 's9e:init' && !port) { port = e.ports[0]; - - return; } - - let m = /"height":([1-9]+\d*)/.exec(e.data); - if (m) + else { - height = m[1]; - } + let height = +e.data.height; - if (height && port) - { - port.postMessage(height); + if (height && port) + { + port.postMessage(height); + } } }; })(document, window); diff --git a/iframe/2/on3.min.html b/iframe/2/on3.min.html index e071c73a..b60b8448 100644 --- a/iframe/2/on3.min.html +++ b/iframe/2/on3.min.html @@ -1 +1 @@ -Content from On3 \ No newline at end of file +Content from On3 \ No newline at end of file