mirror of
https://github.com/mailcow/mailcow-dockerized.git
synced 2025-02-05 16:50:00 +08:00
[Web] U2F: Don't check for Firefox, check only if U2F API is implemented
This commit is contained in:
commit
3199c34417
@ -20,10 +20,9 @@
|
||||
* Modification:
|
||||
* Only continue load this library if window.u2f is not already supplied by the browser.
|
||||
*/
|
||||
var isFirefox = navigator.userAgent.indexOf('Firefox') !== -1 || navigator.userAgent.indexOf('Gecko/') !== -1;
|
||||
var browserImplementsU2f = !!((typeof root.u2f !== 'undefined') && root.u2f.register);
|
||||
|
||||
if (isFirefox && browserImplementsU2f) {
|
||||
if (browserImplementsU2f) {
|
||||
root.u2f.isSupported = true;
|
||||
return;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user