From 36a8e9ce60661122d831b3f6eb0c911704a2bdd7 Mon Sep 17 00:00:00 2001 From: vance Date: Thu, 2 May 2024 21:32:43 -0700 Subject: [PATCH] resize iframe if view width is smaller than frame --- index.html | 1 + 1 file changed, 1 insertion(+) diff --git a/index.html b/index.html index 0135a40..9a29099 100644 --- a/index.html +++ b/index.html @@ -151,6 +151,7 @@ const vw = Math.max(document.documentElement.clientWidth || 0, window.innerWidth || 0); const vh = Math.max(document.documentElement.clientHeight || 0, window.innerHeight || 0); + // resize iframe if view width is smaller than frame if (document.getElementById('live').width > vw) { document.getElementById('live').width = vw; document.getElementById('live').height = vw * (9 / 16);