]> git.mxchange.org Git - friendica.git/commitdiff
In standalone mode, open links to source in a new tab (fixes #3359)
authorPierre Rudloff <contact@rudloff.pro>
Wed, 19 Apr 2017 21:24:43 +0000 (23:24 +0200)
committerPierre Rudloff <contact@rudloff.pro>
Wed, 19 Apr 2017 21:27:11 +0000 (23:27 +0200)
view/theme/frio/js/theme.js

index 41a437de7d6a0fa4d802685add56475da033e0c2..cb03f40b5e7c985969f15bb943d0ce4bbbde7f6b 100644 (file)
@@ -300,6 +300,14 @@ $(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
+               $('.plink').on('click', 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...)