mirror of
https://github.com/Mibew/mibew.git
synced 2025-01-31 05:20:30 +03:00
Merge pull request #259 from jmechnich/fix-ssl-icon-link
fix SSL lock icon link in chat
This commit is contained in:
commit
74b9faf7af
@ -48,14 +48,18 @@
|
|||||||
* Move to secure chat
|
* Move to secure chat
|
||||||
*/
|
*/
|
||||||
secure: function() {
|
secure: function() {
|
||||||
|
if (window.location.protocol == 'https:') {
|
||||||
|
return;
|
||||||
|
}
|
||||||
var link = this.model.get('link');
|
var link = this.model.get('link');
|
||||||
if (link) {
|
if (link) {
|
||||||
var style = Mibew.Objects.Models.page.get('style');
|
var style = Mibew.Objects.Models.page.get('style');
|
||||||
window.location.href = link.replace(/\&\;/g, '&')
|
window.location.href = link.replace(/\&\;/g, '&')
|
||||||
+ (style ? ('&style=' + style) : '');
|
+ (style ? ((link.indexOf('?') > -1 ? '&' : '?')
|
||||||
|
+ 'style=' + style) : '');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
|
||||||
})(Mibew, Handlebars, _);
|
})(Mibew, Handlebars, _);
|
||||||
|
Loading…
Reference in New Issue
Block a user