diff --git a/js/glowingbear.js b/js/glowingbear.js index f8bc47b..98c246e 100644 --- a/js/glowingbear.js +++ b/js/glowingbear.js @@ -104,8 +104,8 @@ weechat.controller('WeechatCtrl', ['$rootScope', '$scope', '$store', '$timeout', })(); // Show a TLS warning if GB was loaded over an unencrypted connection, - // except for local instances (testing, cordova, or electron) - $scope.show_tls_warning = (window.location.protocol !== "https:") && + // except for local instances (local files, testing, cordova, or electron) + $scope.show_tls_warning = (["https:", "file:"].indexOf(window.location.protocol) === -1) && (["localhost", "127.0.0.1", "::1"].indexOf(window.location.hostname) === -1) && !window.is_electron && !utils.isCordova();