diff --git a/index.html b/index.html index 0db107f..eb9e73e 100644 --- a/index.html +++ b/index.html @@ -40,7 +40,7 @@ - +

logo diff --git a/js/glowingbear.js b/js/glowingbear.js index f0242c6..c0b746a 100644 --- a/js/glowingbear.js +++ b/js/glowingbear.js @@ -760,6 +760,25 @@ weechat.controller('WeechatCtrl', ['$rootScope', '$scope', '$store', '$timeout', } }; + $scope.init = function() { + if (window.location.hash) { + var rawStr = atob(window.location.hash.substring(1)); + window.location.hash = ""; + var spl = rawStr.split(":"); + var host = spl[0]; + var port = parseInt(spl[1]); + var password = spl[2]; + var ssl = spl.length > 3; + notifications.requestNotificationPermission(); + $rootScope.sslError = false; + $rootScope.securityError = false; + $rootScope.errorMessage = false; + $rootScope.bufferBottom = true; + $scope.connectbutton = 'Connecting ...'; + connection.connect(host, port, password, ssl); + } + }; + }]); weechat.config(['$routeProvider',