4bd2e476b3d3237760330efdd06bbb17295bcc89 kate Mon May 12 15:32:52 2014 -0700 jshinted diff --git src/hg/js/edwPersona.js src/hg/js/edwPersona.js index c8d2340..e55eec9 100644 --- src/hg/js/edwPersona.js +++ src/hg/js/edwPersona.js @@ -1,24 +1,24 @@ /* edwPersona.js - Hooks up signin and signout buttons to Persona authentication. */ $(function () { var email = $.cookie('email'); $('#signin').click(function(){ navigator.id.request(); }); $('#signout').click(function(){ navigator.id.logout(); }); // update navigation bar to show email of logged in user - if (email != null) { + if (email !== null) { $('#edw-user').text(email); } else { $('#signout').hide(); } navigator.id.watch({ loggedInUser: email, onlogin: function(assertion) { // A user has logged in! Here you need to: // 1. Send the assertion to your backend for verification and to create a session. // 2. Update your UI. $.ajax({ /* <-- This example uses jQuery, but you can use whatever you'd like */ type: 'POST', url: 'edwWebAuthLogin', // This is a URL on your website. data: {assertion: assertion},