mirror of
https://github.com/qbittorrent/qBittorrent.git
synced 2024-12-21 08:09:35 +08:00
Mention lack of HTTPS in WebUI magnet link warning
According to Mozilla docs, registerProtocolHandler() is only available when using secure contexts (i.e. HTTPS for everything outside localhost). https://developer.mozilla.org/en-US/docs/Web/API/Navigator/registerProtocolHandler The message "Your browser does not support this feature" does not make this obvious and can lead to confusion if the user is using a modern browser.
This commit is contained in:
parent
a7bd68a2c7
commit
c1ef846c3d
@ -967,7 +967,10 @@ window.addEvent('load', function() {
|
||||
|
||||
function registerMagnetHandler() {
|
||||
if (typeof navigator.registerProtocolHandler !== 'function') {
|
||||
alert("Your browser does not support this feature");
|
||||
if (window.location.protocol !== 'https:')
|
||||
alert(QBT_TR("To use this feature, the WebUI needs to be accessed over HTTPS")QBT_TR[CONTEXT=MainWindow]);
|
||||
else
|
||||
alert(QBT_TR("Your browser does not support this feature")QBT_TR[CONTEXT=MainWindow]);
|
||||
return;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user