aboutsummaryrefslogtreecommitdiff
path: root/plugins/base/public/assets
diff options
context:
space:
mode:
authorSimon Ser <contact@emersion.fr>2019-12-18 16:11:45 +0100
committerSimon Ser <contact@emersion.fr>2020-01-20 16:20:15 +0100
commit721c3ce3eb41e76b0fddd2f5d42b0bfd99439bdd (patch)
tree23ba9ddff559ef1172b8169af317ee8da1ff6930 /plugins/base/public/assets
parentaf5ffd12f9c23ecf34e1f24b36804623479d44e9 (diff)
downloadalps-721c3ce3eb41e76b0fddd2f5d42b0bfd99439bdd.tar.gz
alps-721c3ce3eb41e76b0fddd2f5d42b0bfd99439bdd.zip
Resize e-mail iframe with content
Diffstat (limited to 'plugins/base/public/assets')
-rw-r--r--plugins/base/public/assets/script.js8
1 files changed, 8 insertions, 0 deletions
diff --git a/plugins/base/public/assets/script.js b/plugins/base/public/assets/script.js
new file mode 100644
index 0000000..84c353e
--- /dev/null
+++ b/plugins/base/public/assets/script.js
@@ -0,0 +1,8 @@
+var emailFrame = document.getElementById("email-frame");
+if (emailFrame) {
+ var resizeFrame = function() {
+ emailFrame.style.height = emailFrame.contentWindow.document.documentElement.scrollHeight + "px";
+ };
+ emailFrame.addEventListener("load", resizeFrame);
+ emailFrame.contentWindow.addEventListener("resize", resizeFrame);
+}