From 5ae1b39ec9b4d5269d2f01aeaa4304252b694519 Mon Sep 17 00:00:00 2001
From: Eugen Rochko <eugen@zeonfederated.com>
Date: Sun, 18 Dec 2016 19:47:11 +0100
Subject: Adjusting public display of statuses to look similar to logged-in UI,
 fix #361 with rich OEmbed display via iframe, fix #237 by hiding sensitive
 content behind a spoiler on public pages

---
 app/assets/javascripts/extras.jsx | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

(limited to 'app/assets/javascripts/extras.jsx')

diff --git a/app/assets/javascripts/extras.jsx b/app/assets/javascripts/extras.jsx
index 93f827044..9fd769c0b 100644
--- a/app/assets/javascripts/extras.jsx
+++ b/app/assets/javascripts/extras.jsx
@@ -1,8 +1,20 @@
 import emojify from './components/emoji'
 
 $(() => {
-  $.each($('.entry .content, .name, .account__header__content'), (_, content) => {
+  $.each($('.entry .content, .entry .status__content, .display-name, .name, .account__header__content'), (_, content) => {
     const $content = $(content);
     $content.html(emojify($content.html()));
   });
+
+  $('.video-player video').on('click', e => {
+    if (e.target.paused) {
+      e.target.play();
+    } else {
+      e.target.pause();
+    }
+  });
+
+  $('.media-spoiler').on('click', e => {
+    $(e.target).hide();
+  });
 });
-- 
cgit 

