Merge pull request #259 from jmechnich/fix-ssl-icon-link

fix SSL lock icon link in chat
This commit is contained in:
Fedor A. Fetisov 2021-06-15 01:07:04 +03:00 committed by GitHub
commit 74b9faf7af
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -48,11 +48,15 @@
* 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(/\&amp\;/g, '&')
+ (style ? ('&style=' + style) : '');
+ (style ? ((link.indexOf('?') > -1 ? '&' : '?')
+ 'style=' + style) : '');
}
}
}