From 2ea2c4b87bfc21ab52a3bab0712e67125357231e Mon Sep 17 00:00:00 2001 From: Pierre Rudloff Date: Wed, 19 Apr 2017 23:24:43 +0200 Subject: [PATCH 1/2] In standalone mode, open links to source in a new tab (fixes #3359) --- view/theme/frio/js/theme.js | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/view/theme/frio/js/theme.js b/view/theme/frio/js/theme.js index 41a437de7d..cb03f40b5e 100644 --- a/view/theme/frio/js/theme.js +++ b/view/theme/frio/js/theme.js @@ -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...) From 8549da4f7bb8349e725885978af28905a49ab455 Mon Sep 17 00:00:00 2001 From: Pierre Rudloff Date: Wed, 19 Apr 2017 23:51:18 +0200 Subject: [PATCH 2/2] Make standalone tweaks work with infinite scrolling --- view/theme/frio/js/theme.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/view/theme/frio/js/theme.js b/view/theme/frio/js/theme.js index cb03f40b5e..b46599eddf 100644 --- a/view/theme/frio/js/theme.js +++ b/view/theme/frio/js/theme.js @@ -303,7 +303,7 @@ $(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) { + $('body').on('click', '.plink', function (e) { $(e.target).attr('target', '_blank'); }); }