Don't check for firefox, only check for u2f browser API

master
Tii 2019-01-30 00:16:30 +01:00
parent 97570fceea
commit 40061ff6af
1 changed files with 1 additions and 2 deletions

View File

@ -20,10 +20,9 @@
* Modification: * Modification:
* Only continue load this library if window.u2f is not already supplied by the browser. * 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); var browserImplementsU2f = !!((typeof root.u2f !== 'undefined') && root.u2f.register);
if (isFirefox && browserImplementsU2f) { if (browserImplementsU2f) {
root.u2f.isSupported = true; root.u2f.isSupported = true;
return; return;
} }