about summary refs log tree commit diff
path: root/app/assets/javascripts/extras.jsx
diff options
context:
space:
mode:
authorEugen Rochko <eugen@zeonfederated.com>2016-12-21 00:13:13 +0100
committerEugen Rochko <eugen@zeonfederated.com>2016-12-21 00:13:13 +0100
commite09d3a2c6692fbc16cc6788cdc32b87e86f0b60f (patch)
treedecd8b232e0a237dccbb6e108b336ccb8f066384 /app/assets/javascripts/extras.jsx
parent806ffbab63fb888bf71fb0dcb74bd4ec11303ab9 (diff)
Fix #249 - use window.location hack to let people login from sandboxed iOS homescreen
Diffstat (limited to 'app/assets/javascripts/extras.jsx')
-rw-r--r--app/assets/javascripts/extras.jsx11
1 files changed, 10 insertions, 1 deletions
diff --git a/app/assets/javascripts/extras.jsx b/app/assets/javascripts/extras.jsx
index 9fd769c0b..b9f8e6842 100644
--- a/app/assets/javascripts/extras.jsx
+++ b/app/assets/javascripts/extras.jsx
@@ -1,7 +1,7 @@
 import emojify from './components/emoji'
 
 $(() => {
-  $.each($('.entry .content, .entry .status__content, .display-name, .name, .account__header__content'), (_, content) => {
+  $.each($('.entry .content, .entry .status__content, .status__display-name, .display-name, .name, .account__header__content'), (_, content) => {
     const $content = $(content);
     $content.html(emojify($content.html()));
   });
@@ -17,4 +17,13 @@ $(() => {
   $('.media-spoiler').on('click', e => {
     $(e.target).hide();
   });
+
+  $('.webapp-btn').on('click', e => {
+    console.log(e);
+
+    if (e.button === 0) {
+      e.preventDefault();
+      window.location.href = $(e.target).attr('href');
+    }
+  });
 });