From: Darren Date: Wed, 23 Jul 2014 19:03:48 +0000 (+0100) Subject: Stop opening new tab on registering default irc handler X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=22ffa51a288fb5831257c5d0019ae7af2907c686;p=KiwiIRC.git Stop opening new tab on registering default irc handler --- diff --git a/client/src/applets/settings.js b/client/src/applets/settings.js index aa5896d..b86d3d2 100644 --- a/client/src/applets/settings.js +++ b/client/src/applets/settings.js @@ -111,12 +111,15 @@ }, selectTheme: function(event) { + event.preventDefault(); + $('[data-setting="theme"].active', this.$el).removeClass('active'); $(event.currentTarget).addClass('active').trigger('change'); - event.preventDefault(); }, registerProtocol: function (event) { + event.preventDefault(); + navigator.registerProtocolHandler('irc', document.location.origin + _kiwi.app.get('base_path') + '/%s', 'Kiwi IRC'); navigator.registerProtocolHandler('ircs', document.location.origin + _kiwi.app.get('base_path') + '/%s', 'Kiwi IRC'); },