From c3f8718f9912397daebc2bfe2b8fe88b09cf5cfb Mon Sep 17 00:00:00 2001 From: Rodrigo Nascimento Date: Wed, 26 Aug 2015 10:50:32 -0300 Subject: [PATCH] Prevent open images in external browser --- app/preload.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/app/preload.js b/app/preload.js index 32f53c8778..970f1a41e6 100644 --- a/app/preload.js +++ b/app/preload.js @@ -18,7 +18,9 @@ var supportExternalLinks = function (e) { var checkDomElement = function (element) { if (element.nodeName === 'A') { - href = element.getAttribute('href') || ''; + if (element.classList.contains('swipebox') == false) { + href = element.getAttribute('href') || ''; + } } if (/^https?:\/\/.+/.test(href) === true /*&& RegExp('^https?:\/\/'+location.host).test(href) === false*/) {