]> git.mxchange.org Git - friendica.git/blobdiff - view/theme/frio/js/theme.js
Merge pull request #3458 from Hypolite/bug/missing-require-poco
[friendica.git] / view / theme / frio / js / theme.js
index 27dd296e5f4036ce3c23e9360810de6adbdf071b..b46599eddf11b85464ffb7c3215b66aa406627ad 100644 (file)
@@ -300,6 +300,21 @@ $(document).ready(function(){
                });
        });
 
+       // Customize some elements when the app is used in standalone mode on Android
+       if (window.matchMedia('(display-mode: standalone)').matches) {
+               // Open links to source outside of the webview
+               $('body').on('click', '.plink', function (e) {
+                       $(e.target).attr('target', '_blank');
+               });
+       }
+
+       /*
+        * This event listeners ensures that the textarea size is updated event if the
+        * value is changed externally (textcomplete, insertFormatting, fbrowser...)
+        */
+       $(document).on('change', 'textarea', function(event) {
+               autosize.update(event.target);
+       });
 });
 
 function openClose(theID) {