diff --git a/src/webui/www/private/index.html b/src/webui/www/private/index.html
index 90dda35d0..f3cc77357 100644
--- a/src/webui/www/private/index.html
+++ b/src/webui/www/private/index.html
@@ -77,6 +77,7 @@
QBT_TR(Tools)QBT_TR[CONTEXT=MainWindow]
diff --git a/src/webui/www/private/scripts/client.js b/src/webui/www/private/scripts/client.js
index c2621af2b..b8bdf323b 100644
--- a/src/webui/www/private/scripts/client.js
+++ b/src/webui/www/private/scripts/client.js
@@ -590,6 +590,10 @@ window.addEvent('load', function() {
MochaUI.Desktop.setDesktopSize();
});
+ $('registerMagnetHandlerLink').addEvent('click', function(e) {
+ registerMagnetHandler();
+ });
+
$('speedInBrowserTitleBarLink').addEvent('click', function(e) {
speedInTitle = !speedInTitle;
localStorage.setItem('speed_in_browser_title_bar', speedInTitle.toString());
@@ -801,13 +805,13 @@ window.addEvent('load', function() {
addMainWindowTabsEventListener();
addSearchPanel();
}
-
- registerMagnetHandler();
});
function registerMagnetHandler() {
- if (typeof navigator.registerProtocolHandler !== 'function')
+ if (typeof navigator.registerProtocolHandler !== 'function') {
+ alert("Your browser does not support this feature");
return;
+ }
const hashParams = getHashParamsFromUrl();
hashParams.download = '';