From f33778a5f72a08550cc7f25ab93f67bfd44c7c1d Mon Sep 17 00:00:00 2001 From: kkmuffme <11071985+kkmuffme@users.noreply.github.com> Date: Wed, 28 Nov 2018 17:23:30 +0100 Subject: [PATCH] Remove unnecessary console.log (#264) --- providers/js/fido-u2f-admin.js | 4 ---- providers/js/fido-u2f-login.js | 8 ++------ 2 files changed, 2 insertions(+), 10 deletions(-) diff --git a/providers/js/fido-u2f-admin.js b/providers/js/fido-u2f-admin.js index 5fd64057..f6b06630 100644 --- a/providers/js/fido-u2f-admin.js +++ b/providers/js/fido-u2f-admin.js @@ -15,8 +15,6 @@ return false; } - window.console.log( 'sign', u2fL10n.register.request ); - $( this ).prop( 'disabled', true ); $( '.register-security-key .spinner' ).addClass( 'is-active' ); $statusNotice.text( '' ); @@ -31,8 +29,6 @@ $button.prop( 'disabled', false ); if ( data.errorCode ) { - window.console.log( 'Registration Failed', data.errorCode ); - if ( u2fL10n.text.error_codes[ data.errorCode ] ) { $statusNotice.text( u2fL10n.text.error_codes[ data.errorCode ] ); } else { diff --git a/providers/js/fido-u2f-login.js b/providers/js/fido-u2f-login.js index f3ccf2d8..0fe4cb1a 100644 --- a/providers/js/fido-u2f-login.js +++ b/providers/js/fido-u2f-login.js @@ -1,17 +1,13 @@ /* global u2f, u2fL10n */ ( function( $ ) { if ( ! window.u2fL10n ) { - window.console.log( 'u2fL10n is not defined' ); + window.console.error( 'u2fL10n is not defined' ); return; } - window.console.log( 'sign', u2fL10n.request ); - u2f.sign( u2fL10n.request[0].appId, u2fL10n.request[0].challenge, u2fL10n.request, function( data ) { - window.console.log( 'Authenticate callback', data ); - if ( data.errorCode ) { - window.console.log( 'Registration Failed', data.errorCode ); + window.console.error( 'Registration Failed', data.errorCode ); } else { $( '#u2f_response' ).val( JSON.stringify( data ) ); $( '#loginform' ).submit();