<commit_before>Auth = function() {
  var self = this;

  function initialize() {
    $('.auth-provider').live("click", function(e){
      e.preventDefault();
      var authUrl = $(this).attr('href');
      openPopup(authUrl);
    });

    $('#openid_url').parents('form').submit(function(){
      var openid = $('#openid_url').val();
      openid = openid.replace('http://','');
      openid = openid.replace('https://','');
      $('#openid_url').val(openid)
    });
  }

  function positionDropdown() {
    if(Ui.offline()){
      $('.providers-list').show().offset({left: $('.offline').offset().left+$('.offline').width()-$('.providers-list').width()}).hide();
        //$('.providers-list').show().offset({left: $('body').width()/2-$('#column2').width()/2}).css({width: '290px'});
    }
  }

  function dropdownToggle() {
    $('[data-toggle-dropdown]').click(function(){
      var toggleClass = $(this).data('toggle-dropdown');
      $('.dropdown-form').addClass('hidden');
      var toggleEle = $('.'+toggleClass).toggleClass('hidden');
      positionDropdown();
      $('.providers-list').show();
      return false;
    })
  }

  function openPopup(authUrl) {
    var pparg;
    if(authUrl.indexOf('{')!=-1){
      authUrl = authUrl.split('=')[1];
      $('[data-toggle-dropdown=dropdown-signin-openid]').trigger('click');
      $('#openid_url').val(authUrl);
      return false;
    } else {
      $.cookie('pp', 1);
      (authUrl.indexOf('?')==-1)? pparg = '?pp=1' : pparg = '&pp=1'
      window.open(authUrl+pparg, 'openid_popup', 'width=700,height=500');
      $('#login_dialog').dialog('close');
    }
  }
<commit_msg>only position signin dropdown when user is signed out<commit_after>Auth = function() {
  var self = this;

  function initialize() {
    $('.auth-provider').live("click", function(e){
      e.preventDefault();
      var authUrl = $(this).attr('href');
      openPopup(authUrl);
    });

    $('#openid_url').parents('form').submit(function(){
      var openid = $('#openid_url').val();
      openid = openid.replace('http://','');
      openid = openid.replace('https://','');
      $('#openid_url').val(openid)
    });
  }

  function positionDropdown() {
    if(Ui.offline() && !Ui.notMember()){
      $('.providers-list').show().offset({left: $('.offline').offset().left+$('.offline').width()-$('.providers-list').width()}).hide();
        //$('.providers-list').show().offset({left: $('body').width()/2-$('#column2').width()/2}).css({width: '290px'});
    }
  }

  function dropdownToggle() {
    $('[data-toggle-dropdown]').click(function(){
      var toggleClass = $(this).data('toggle-dropdown');
      $('.dropdown-form').addClass('hidden');
      var toggleEle = $('.'+toggleClass).toggleClass('hidden');
      positionDropdown();
      $('.providers-list').show();
      return false;
    })
  }

  function openPopup(authUrl) {
    var pparg;
    if(authUrl.indexOf('{')!=-1){
      authUrl = authUrl.split('=')[1];
      $('[data-toggle-dropdown=dropdown-signin-openid]').trigger('click');
      $('#openid_url').val(authUrl);
      return false;
    } else {
      $.cookie('pp', 1);
      (authUrl.indexOf('?')==-1)? pparg = '?pp=1' : pparg = '&pp=1'
      window.open(authUrl+pparg, 'openid_popup', 'width=700,height=500');
      $('#login_dialog').dialog('close');
    }
  }

{'fraction_non_alphanumeric': 0.249172434547096, 'fraction_numerical': 0.010833584110743304, 'mean_word_length': 3.350785340314136, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 2, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3744213', 'n_tokens_mistral': 1116, 'n_tokens_neox': 1098, 'n_words': 145}