diff --git a/index.html b/index.html index 9d6bafb..990212d 100644 --- a/index.html +++ b/index.html @@ -254,7 +254,7 @@ $ openssl req -nodes -newkey rsa:2048 -keyout relay.pem -x509 -days 365 -out rel {{ part.text }} - +
diff --git a/js/plugins.js b/js/plugins.js index 33db097..5599972 100644 --- a/js/plugins.js +++ b/js/plugins.js @@ -80,19 +80,6 @@ plugins.service('plugins', ['userPlugins', '$sce', function(userPlugins, $sce) { } } - /* Replace all URLs with hyperlinks */ - - var urlRegexp = RegExp(/(http|ftp|https):\/\/[\w-]+(\.[\w-]+)+([\w.,@?^=%&:\/~+#-]*[\w@?^=%&\/~+#-])?/g); - for(k in message.content) { - var text = message.content[k].text; - var url = text.match(urlRegexp); - for(i in url) { - var u = url[i]; - text = text.replace(u, '' + u + ''); - } - message.content[k].text = $sce.trustAsHtml(text); - } - return message; } diff --git a/js/websockets.js b/js/websockets.js index 6f4aa1b..c1d5995 100644 --- a/js/websockets.js +++ b/js/websockets.js @@ -667,6 +667,11 @@ weechat.controller('WeechatCtrl', ['$rootScope', '$scope', '$store', '$timeout', } } + // Prevent user from accidentally leaving the page + window.onbeforeunload = function(event) { + event.preventDefault(); + }; + }] );