From 9978074fbcda5a8f681968c4dfbe9fdddf4795d5 Mon Sep 17 00:00:00 2001 From: jmechnich Date: Fri, 11 Jun 2021 21:19:52 +0200 Subject: [PATCH] fix SSL lock icon link in chat --- .../js/source/chat/model_views/controls/secure_mode.js | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/mibew/js/source/chat/model_views/controls/secure_mode.js b/src/mibew/js/source/chat/model_views/controls/secure_mode.js index e6e4361b..8e7565e9 100644 --- a/src/mibew/js/source/chat/model_views/controls/secure_mode.js +++ b/src/mibew/js/source/chat/model_views/controls/secure_mode.js @@ -48,14 +48,18 @@ * Move to secure chat */ secure: function() { + if (window.location.protocol == 'https:') { + return; + } var link = this.model.get('link'); if (link) { var style = Mibew.Objects.Models.page.get('style'); window.location.href = link.replace(/\&\;/g, '&') - + (style ? ('&style=' + style) : ''); + + (style ? ((link.indexOf('?') > -1 ? '&' : '?') + + 'style=' + style) : ''); } } } ); -})(Mibew, Handlebars, _); \ No newline at end of file +})(Mibew, Handlebars, _);