aboutsummaryrefslogtreecommitdiff
path: root/plugins/base/public
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/base/public')
-rw-r--r--plugins/base/public/assets/script.js18
-rw-r--r--plugins/base/public/assets/style.css5
-rw-r--r--plugins/base/public/foot.html1
-rw-r--r--plugins/base/public/head.html1
-rw-r--r--plugins/base/public/message.html10
5 files changed, 2 insertions, 33 deletions
diff --git a/plugins/base/public/assets/script.js b/plugins/base/public/assets/script.js
deleted file mode 100644
index fd7a1d5..0000000
--- a/plugins/base/public/assets/script.js
+++ /dev/null
@@ -1,18 +0,0 @@
-var emailFrame = document.getElementById("email-frame");
-if (emailFrame) {
- // Resize the frame with its content
- var resizeFrame = function() {
- emailFrame.style.height = emailFrame.contentWindow.document.documentElement.scrollHeight + "px";
- };
- emailFrame.addEventListener("load", resizeFrame);
- emailFrame.contentWindow.addEventListener("resize", resizeFrame);
-
- // Polyfill in case the srcdoc attribute isn't supported
- if (!emailFrame.srcdoc) {
- var srcdoc = emailFrame.getAttribute("srcdoc");
- var doc = emailFrame.contentWindow.document;
- doc.open();
- doc.write(srcdoc);
- doc.close();
- }
-}
diff --git a/plugins/base/public/assets/style.css b/plugins/base/public/assets/style.css
deleted file mode 100644
index 4f91f63..0000000
--- a/plugins/base/public/assets/style.css
+++ /dev/null
@@ -1,5 +0,0 @@
-iframe {
- width: 100%;
- height: 400px;
- border: 0;
-}
diff --git a/plugins/base/public/foot.html b/plugins/base/public/foot.html
index 284d779..b605728 100644
--- a/plugins/base/public/foot.html
+++ b/plugins/base/public/foot.html
@@ -1,3 +1,2 @@
- <script src="/plugins/base/assets/script.js"></script>
</body>
</html>
diff --git a/plugins/base/public/head.html b/plugins/base/public/head.html
index bed1bb3..bb47cfc 100644
--- a/plugins/base/public/head.html
+++ b/plugins/base/public/head.html
@@ -3,6 +3,5 @@
<head>
<meta charset="utf-8">
<title>koushin</title>
- <link rel="stylesheet" href="/plugins/base/assets/style.css">
</head>
<body>
diff --git a/plugins/base/public/message.html b/plugins/base/public/message.html
index a973881..5457627 100644
--- a/plugins/base/public/message.html
+++ b/plugins/base/public/message.html
@@ -110,7 +110,7 @@
<hr>
-{{if .Body}}
+{{if .View}}
<p>
{{if .Message.HasFlag "\\Draft"}}
<a href="{{.Message.Uid}}/edit?part={{.PartPath}}">Edit draft</a>
@@ -118,13 +118,7 @@
<a href="{{.Message.Uid}}/reply?part={{.PartPath}}">Reply</a>
{{end}}
</p>
- {{if .IsHTML}}
- <!-- allow-same-origin is required to resize the frame with its content -->
- <!-- allow-popups is required for target="_blank" links -->
- <iframe id="email-frame" srcdoc="{{.Body}}" sandbox="allow-same-origin allow-popups"></iframe>
- {{else}}
- <pre>{{.Body}}</pre>
- {{end}}
+ {{.View}}
{{else}}
<p>Can't preview this message part.</p>
<a href="{{.Message.Uid}}/raw?part={{.PartPath}}">Download</a>