From 89717bca88f0fc0c0a73e46467c143933029f14f Mon Sep 17 00:00:00 2001 From: Ihor Polyakov Date: Sat, 30 Jan 2016 09:56:17 +0700 Subject: [PATCH] Open links starting with https://telegram.me/ in the same window closes #1042 --- app/js/services.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/app/js/services.js b/app/js/services.js index 0f304503..60d1222b 100755 --- a/app/js/services.js +++ b/app/js/services.js @@ -4228,7 +4228,11 @@ angular.module('myApp.services', ['myApp.i18n', 'izhukov.utils']) type: 'JUMP_EXT_URL', url: url }).then(function () { - window.open(url, '_blank'); + var target = '_blank'; + if (url.search('https://telegram.me/') === 0) { + target = '_self'; + } + window.open(url, target); }); return true; }