Sha256: d43afb4d609f18999e7d31884495cbab567ef1af2638ded78466767251dfd73f

Contents?: true

Size: 557 Bytes

Versions: 2

Compression:

Stored size: 557 Bytes

Contents

function loginViaEmail() {
  navigator.id.getVerifiedEmail(function(assertion) {
    if (assertion) {
      $('input[name=assertion]').val(assertion);
      $('form').submit();
    } else {
      window.location = "/auth/failure";
    }
  });
}

$(document).ready(function() {
  $('form').submit(function(evt) {
    $('html').addClass('loading');
  });

  $('a#browser_id').click(function(evt) {
    evt.preventDefault();
    loginViaEmail();
  });

  var showAdmin = $.cookie('show_admin');
  if (showAdmin) {
    $('body').addClass('show_admin');
  }
});

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
schnitzelpress-0.2.1 lib/assets/js/schnitzelpress.js
schnitzelpress-0.2.0 lib/assets/js/schnitzelpress.js