<commit_before>
  <!-- Start of openaccessbutton Zendesk Widget script -->
  <script>/*<![CDATA[*/window.zEmbed||function(e,t){var n,o,d,i,s,a=[],r=document.createElement("iframe");window.zEmbed=function(){a.push(arguments)},window.zE=window.zE||window.zEmbed,r.src="javascript:false",r.title="",r.role="presentation",(r.frameElement||r).style.cssText="display: none",d=document.getElementsByTagName("script"),d=d[d.length-1],d.parentNode.insertBefore(r,d),i=r.contentWindow,s=i.document;try{o=s}catch(e){n=document.domain,r.src='javascript:var d=document.open();d.domain="'+n+'";void(0);',o=s}o.open()._l=function(){var o=this.createElement("script");n&&(this.domain=n),o.id="js-iframe-async",o.src=e,this.t=+new Date,this.zendeskHost=t,this.zEQueue=a,this.body.appendChild(o)},o.write('<body onload="document._l();">'),o.close()}("https://assets.zendesk.com/embeddable_framework/main.js","openaccessbutton.zendesk.com");
  /*]]>*/</script>
  <!-- End of openaccessbutton Zendesk Widget script -->

<script>
jQuery(document).ready(function() {
  // on this page, an installed plugin should:
  // look for #apikey field to read api key, after suitable delay to wait for data returned from server
  // hide the download buttons
  // set button as already downloaded, if not already set as such
  // verify that the plugin is successfully installed and has registered the api key

  if (window.innerWidth > 991) {
    $('#cloginArea .well').css('min-height','250px');
  }

  var savevalidate = function() {
    if ( $('#profile\\.firstname').val() && $('#profile\\.lastname').val() && $('#service\\.openaccessbutton\\.profile\\.profession').val() ) {
      return true;
    } else {
      $('#cloginSaveMessages').html('<p>Some information is missing. Please confirm you have completed all the fields. Then save again.</p>');
      return false;
    }
  }
  var afterlogin = function() {
    //$('#downloads').hide();
    if (clogin.user.account.username || (clogin.user.account.profile && clogin.user.account.profile.firstname ) ) {
      var hl = clogin.user.account.profile && clogin.user.account.profile.firstname ? clogin.user.account.profile.firstname : clogin.user.account.username;
      $('.username').html(hl);
      if (clogin.next) {
        $('#tonext').attr('href',clogin.next);
        $('#tonextalert').show();
        window.location = clogin.next;
      }
    }
    if (clogin.apikey) {
      $('#apikey').html(clogin.apikey);
      $('#bookmarklet').attr('href',$('#bookmarklet').attr('href').replace('XXXX',clogin.apikey));
      $('#bookmarklet').removeClass('disabled');
    }
    try {
      var p = clogin.user.account.profile ? clogin.user.account.profile : {};
      var s = clogin.user.account.service.openaccessbutton.profile ? clogin.user.account.service.openaccessbutton.profile : {};
      if (!p.firstname || !p.lastname || !s.profession || !s.confirm_public || !s.confirm_terms ) {
        if (p.firstname) $('#profile\\.firstname').val(p.firstname);
        if (p.lastname) $('#profile\\.lastname').val(p.lastname);
        //if (s.orcid) $('#service\\.openaccessbutton\\.profile\\.orcid').val(s.orcid);
        if (s.affiliation) $('#service\\.openaccessbutton\\.profile\\.affiliation').val(s.affiliation);
        if (s.profession) $('#service\\.openaccessbutton\\.profile\\.profession').val(s.profession);
        if (s.confirm_public && s.confirm_terms) $('#agreeterms').hide();
        $('#setinfo').show();
        $('#sayhello').hide();
      } else {
        //$('#downloads').show();
      }
    } catch(err) {
      $('#setinfo').show();
      $('#sayhello').hide();
    }
  }
  var aftersave = function() {
    $('#setinfo').hide();
    //$('#downloads').show();
    if (clogin.next) {
      $('#tonext').attr('href',clogin.next);
      $('#tonextalert').show();
    }
  }
  var afterfailure = function() {
    $('#cloginMessages').html('<p>This link or code expired! They do that after their first use, 30 minutes, or if you get sent another. Refresh the page and reenter your email to try again.</p>');
  }
  var api = 'https://api.cottagelabs.com/accounts';
  if (window.location.host.indexOf('openaccessbutton.org') === -1 || window.location.host.indexOf('dev.openaccessbutton.org') !== -1) {
    api = 'https://dev.api.cottagelabs.com/accounts';
    $('#bookmarklet').attr('href',$('#bookmarklet').attr('href').replace('YYYY','https://dev.openaccessbutton.org'));
  } else {
    $('#bookmarklet').attr('href',$('#bookmarklet').attr('href').replace('YYYY','https://openaccessbutton.org'));
  }
  clogin.init({api:api,afterLogin: afterlogin, saveValidate: savevalidate, afterSave: aftersave, afterFailure: afterfailure });

  if (window.location.href.indexOf('email=') !== -1) {
    $('#cloginEmail').val(window.location.href.split('next=')[0].split('email=')[1].split('&')[0]);
    setTimeout(function() { $('#cloginSubmit').trigger('click'); }, 100);
  }

  var mobileCheck = function() {
    // checks if browser is a mobile or tablet browser
    var check = false;
    (function(a){if(/(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows ce|xda|xiino|android|ipad|playbook|silk/i.test(a)||/1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s\-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|\-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw\-(n|u)|c55\/|capi|ccwa|cdm\-|cell|chtm|cldc|cmd\-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc\-s|devi|dica|dmob|do(c|p)o|ds(12|\-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(\-|_)|g1 u|g560|gene|gf\-5|g\-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd\-(m|p|t)|hei\-|hi(pt|ta)|hp( i|ip)|hs\-c|ht(c(\-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i\-(20|go|ma)|i230|iac( |\-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc\-|kyo(c|k)|le(no|xi)|lg( g|\/(k|l|u)|50|54|\-[a-w])|libw|lynx|m1\-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m\-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(\-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)\-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|\-([1-8]|c))|phil|pire|pl(ay|uc)|pn\-2|po(ck|rt|se)|prox|psio|pt\-g|qa\-a|qc(07|12|21|32|60|\-[2-7]|i\-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h\-|oo|p\-)|sdk\/|se(c(\-|0|1)|47|mc|nd|ri)|sgh\-|shar|sie(\-|m)|sk\-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h\-|v\-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl\-|tdg\-|tel(i|m)|tim\-|t\-mo|to(pl|sh)|ts(70|m\-|m3|m5)|tx\-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|\-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(\-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas\-|your|zeto|zte\-/i.test(a.substr(0,4))) check = true;})(navigator.userAgent||navigator.vendor||window.opera);
    return check;
  };
  var mobile = mobileCheck();
  var b = '.bk';
  if (navigator.userAgent.match(/chrome/i) && !navigator.userAgent.match(/edge/i) && !mobile) b = '.ch';
  if (navigator.userAgent.match(/firefox/i) && !mobile) b = '.ff';
  if (mobile) b = '.mob';
  $('.dl').hide();
  $('.dl'+b).show();

  $('#viewrequests').bind('click',function(e) {
    $(this).attr('href','/request?q=user.id:'+clogin.user.account._id);
  });

  var a = window.location.href.indexOf('a=') !== -1 ? window.location.href.split('a=')[1].split('&')[0] : undefined;
  if ( a && a.length > 0 ) $('#cloginSubmit').html(a.substring(0,1).toUpperCase() + a.substring(1,a.length).replace('nup','n up'));
});
</script>

<div class="container-fluid notcloggedin" id="cloginArea">
  <div class="row">
    <div class="col-md-6 col-md-offset-3">
      <div>
        <div id="cloginEmailArea">
          <h2 style="text-align:center;">Sign in to your account</h2>
          <p style="text-align:center;">
            No account yet? <br>
            Just enter your email address to get started.<br>
          </p>
          <input type="email" class="form-control" id="cloginEmail" name="email" placeholder="Enter your email address">
          <button id="cloginSubmit" type="submit" class="btn btn-action btn-block" style="margin-top:10px;">Sign up / Login</button>
        </div>
        <div id="cloginTokenArea" style="display:none;">
          <h2 style="text-align:center;">Go check your email!</h2>
          <p style="text-align:center;">
            We use a password-free system.<br>
            It's more secure and means you have one less password to remember.
          </p>
          <p style="text-align:center;">
            We sent you a login code via email. Enter it below.
          </p>
          <input type="text" class="form-control" id="cloginToken" placeholder="Enter your login code">
          <p style="text-align:center;">
            <br>If you don't receive an email within a few minutes, check your spam folder. Contact us at
            <a href="mailto:<EMAIL>?subject=issues signing in"><EMAIL></a> if you have trouble logging in.
          </p>
        </div>
        <div id="cloginMessages" style="margin-top:5px;"></div>
        <div id="cloginLoading" style="display:none;"><img style="height:30px;" src="//static.cottagelabs.com/spinner.gif"></div>
      </div>

      <div class="row dl ch" id="install" style="margin-top:70px;margin-bottom:100px;">
        <div class="col-md-1 col-md-offset-1">
          <p style="font-size:40px;line-height:10px;color:#398bc5;text-align:center;">
            <i class="glyphicon glyphicon-download"></i>
          </p>
        </div>
        <div class="col-md-10">
          <p style="text-align:center;">
            Always have the button by your side.
            <a style="margin-top:5px;" class="chromeinstall" target="_blank" href="https://chrome.google.com/webstore/detail/open-access-button/gknkbkaapnhpmkcgkmdekdffgcddoiel">
            <br>Get the browser extension in one click.
            </a>
          </p>
        </div>
      </div>
    </div>
  </div>
</div>


<div class="container-fluid cloggedin" id="userinfo" style="display:none;">
  <div id="tonextalert" class="row" style="display:none;">
    <div class="col-md-8 col-md-offset-2">
      <div class="alert alert-info">
        <h4><a id="tonext" href="">Click here to return to the page you were viewing.</a></h4>
      </div>
    </div>
  </div>

  <div class="row">
    <div class="col-md-8 col-md-offset-2">
      <h2 id="sayhello">Hello <span class="username"></span></h2>
      <p id="apikey" style="display:none;"></p>

      <div id="setinfo" style="display:none;">
        <h1>Thanks for signing up!</h1>
        <p>We use these details during requests to help authors understand who you are, and motivate them to share.</p>
        <div class="row">
          <div class="col-md-6">
            <input style="margin-top:7px;" type="text" id="profile.firstname" name="first name" class="form-control cloginSave" placeholder="First name (required)">
          </div>
          <div class="col-md-6">
            <input style="margin-top:7px;" type="text" id="profile.lastname" name="last name" class="form-control cloginSave" placeholder="Family name (required)">
          </div>
        </div>
        <input style="margin-top:7px;" type="text" id="service.openaccessbutton.profile.affiliation" name="affiliation" class="form-control cloginSave" placeholder="Affiliation (University name, Business name etc)">
        <select id="service.openaccessbutton.profile.profession" name="profession" class="form-control cloginSave" style="margin-top:7px;">
          <option value="">Profession (required)</option>
          <option value="Student">Student</option>
          <option value="Health professional">Health professional</option>
          <option value="Patient">Patient</option>
          <option value="Researcher">Researcher</option>
          <option value="Librarian">Librarian</option>
          <option value="Other">Other</option>
        </select>
        <p id="agreeterms" style="margin-top:7px;">
          By signing up
          I understand that information obtained by the Button will be public, and that
          I agree to the Open Access Button
          <a target="_blank" href="/privacy" style="text-decoration:underline;">privacy policy</a>
          and
          <a target="_blank" href="/terms" style="text-decoration:underline;">terms of service.</a>
        </p>
        <input id="service.openaccessbutton.profile.confirm_public" type="checkbox" checked style="display:none;" class="cloginSave">
        <input id="service.openaccessbutton.profile.confirm_terms" type="checkbox" checked style="display:none;" class="cloginSave">
        <button id="cloginSave" type="button" class="btn btn-action" style="margin-top:5px;">Save your details</button>
        <div id="cloginSaveMessages"></div>
      </div>

    </div>
  </div>
</div>

<div class="container-fluid cloggedin" id="downloads" style="margin-bottom:200px;display:none;">
  <div class="row">
    <div class="col-md-8 col-md-offset-2">
      <h3>Get Started</h3>
      <div id="plugin_messages"></div>
      <a id="chromeinstall" style="margin-top:5px;" class="btn btn-action btn-block dl ch" target="_blank" href="https://chrome.google.com/webstore/detail/open-access-button/gknkbkaapnhpmkcgkmdekdffgcddoiel">Get the Chrome Extension</a>
      <a id="firefoxinstall" style="margin-top:5px;" class="btn btn-action btn-block dl ff disabled" target="_blank" href="https://addons.mozilla.org/en-GB/firefox/addon/openaccessbutton/">Firefox Plugin Coming Soon</a>
      <p class="dl mob">Doing research on the move? We'd like to make an app for your phone. But, right now you can use it in your browser. Check back when you're by your computer for our plugins.</p>
      <div class="well dl bk ff" style="margin:5px 0px 5px 0px;"> <!-- for now show bookmarklet on ff too -->
        <p>
        To install just drag the Button to your bookmarks bar.
        </p>
        <a id="bookmarklet" class="btn btn-action btn-block disabled" href="javascript:apikey='XXXX';document.getElementsByTagName('body')[0].appendChild(document.createElement('script')).setAttribute('src','YYYY/static/bookmarklet/includer.js?r='+Math.random());">Open Access Button</a>
        <p><small>Having trouble? See instructions for <a href="/bookmarklet_install_ie" target="_blank" >Internet Explorer</a>, <a href="/bookmarklet_install_ff" target="_blank" >Firefox</a> and <a href="/bookmarklet_install_safari" target="_blank" >Safari</a>. If your bookmarks bar is hidden here's how to show it:
                <br>
                Chrome, Safari and Internet Explorer: Control (Command on a Mac) + Shift + B
                <br>
                Firefox: Alt + V, then T, then B</small>
      </div>

      <!--<h3>Instructions</h3>
      <p>We’ve worked hard to make the Button easy to use. Here’s what you need to know:</p>
      <ol>
        <li>The Button works from <a href="https://en.wikipedia.org/wiki/Academic_journal"target="_blank" >academic journal articles</a>. Click the Button when you want the article or data supporting a paper.</li>
        <li>If you get an email from us, it’s important.</li>
        <li>If you need help, email us at <a href="mailto:<EMAIL>"><EMAIL></a></li>
      </ol>
      <p>Want to test it out? Try searching for <a href="http://science.sciencemag.org/content/293/5530/629" target="_blank">this article</a>.</p>-->
      <p><br><a id="cloginLogout" class="btn btn-warning" href="#">Logout</a></p>
    </div>
  </div>
</div>
<commit_msg>restoring account<commit_after>
  <!-- Start of openaccessbutton Zendesk Widget script -->
  <script>/*<![CDATA[*/window.zEmbed||function(e,t){var n,o,d,i,s,a=[],r=document.createElement("iframe");window.zEmbed=function(){a.push(arguments)},window.zE=window.zE||window.zEmbed,r.src="javascript:false",r.title="",r.role="presentation",(r.frameElement||r).style.cssText="display: none",d=document.getElementsByTagName("script"),d=d[d.length-1],d.parentNode.insertBefore(r,d),i=r.contentWindow,s=i.document;try{o=s}catch(e){n=document.domain,r.src='javascript:var d=document.open();d.domain="'+n+'";void(0);',o=s}o.open()._l=function(){var o=this.createElement("script");n&&(this.domain=n),o.id="js-iframe-async",o.src=e,this.t=+new Date,this.zendeskHost=t,this.zEQueue=a,this.body.appendChild(o)},o.write('<body onload="document._l();">'),o.close()}("https://assets.zendesk.com/embeddable_framework/main.js","openaccessbutton.zendesk.com");
  /*]]>*/</script>
  <!-- End of openaccessbutton Zendesk Widget script -->

<script>
jQuery(document).ready(function() {
  // on this page, an installed plugin should:
  // look for #apikey field to read api key, after suitable delay to wait for data returned from server
  // hide the download buttons
  // set button as already downloaded, if not already set as such
  // verify that the plugin is successfully installed and has registered the api key
  if (window.innerWidth > 991) {
    $('#cloginArea .well').css('min-height','250px');
  }
  var savevalidate = function() {
    if ( $('#profile\\.firstname').val() && $('#profile\\.lastname').val() && $('#service\\.openaccessbutton\\.profile\\.profession').val() ) {
      return true;
    } else {
      $('#cloginSaveMessages').html('<p>Some information is missing. Please confirm you have completed all the fields. Then save again.</p>');
      return false;
    }
  }
  var afterlogin = function() {
    //$('#downloads').hide();
    if (clogin.user.account.username || (clogin.user.account.profile && clogin.user.account.profile.firstname ) ) {
      var hl = clogin.user.account.profile && clogin.user.account.profile.firstname ? clogin.user.account.profile.firstname : clogin.user.account.username;
      $('.username').html(hl);
      if (clogin.next) {
        $('#tonext').attr('href',clogin.next);
        $('#tonextalert').show();
        window.location = clogin.next;
      }
    }
    if (clogin.apikey) {
      $('#apikey').html(clogin.apikey);
      $('#bookmarklet').attr('href',$('#bookmarklet').attr('href').replace('XXXX',clogin.apikey));
      $('#bookmarklet').removeClass('disabled');
    }
    try {
      var p = clogin.user.account.profile ? clogin.user.account.profile : {};
      var s = clogin.user.account.service.openaccessbutton.profile ? clogin.user.account.service.openaccessbutton.profile : {};
      if (!p.firstname || !p.lastname || !s.profession || !s.confirm_public || !s.confirm_terms ) {
        if (p.firstname) $('#profile\\.firstname').val(p.firstname);
        if (p.lastname) $('#profile\\.lastname').val(p.lastname);
        //if (s.orcid) $('#service\\.openaccessbutton\\.profile\\.orcid').val(s.orcid);
        if (s.affiliation) $('#service\\.openaccessbutton\\.profile\\.affiliation').val(s.affiliation);
        if (s.profession) $('#service\\.openaccessbutton\\.profile\\.profession').val(s.profession);
        if (s.confirm_public && s.confirm_terms) $('#agreeterms').hide();
        $('#setinfo').show();
        $('#sayhello').hide();
      } else {
        //$('#downloads').show();
      }
    } catch(err) {
      $('#setinfo').show();
      $('#sayhello').hide();
    }
  }
  var aftersave = function() {
    $('#setinfo').hide();
    //$('#downloads').show();
    if (clogin.next) {
      $('#tonext').attr('href',clogin.next);
      $('#tonextalert').show();
    }
  }
  var afterfailure = function() {
    $('#cloginMessages').html('<p>This link or code expired! They do that after their first use, 30 minutes, or if you get sent another. Refresh the page and reenter your email to try again.</p>');
  }
  var api = 'https://api.cottagelabs.com/accounts';
  if (window.location.host.indexOf('openaccessbutton.org') === -1 || window.location.host.indexOf('dev.openaccessbutton.org') !== -1) {
    api = 'https://dev.api.cottagelabs.com/accounts';
    $('#bookmarklet').attr('href',$('#bookmarklet').attr('href').replace('YYYY','https://dev.openaccessbutton.org'));
  } else {
    $('#bookmarklet').attr('href',$('#bookmarklet').attr('href').replace('YYYY','https://openaccessbutton.org'));
  }
  // TODO set these for oabutton to have its own oauth accounts:
  // clogin.oauthGoogleClientId = '';
  clogin.oauthFacebookAppId = '114282989239097';
  clogin.init({api:api,afterLogin: afterlogin, saveValidate: savevalidate, afterSave: aftersave, afterFailure: afterfailure });
  if (window.location.href.indexOf('email=') !== -1) {
    $('#cloginEmail').val(window.location.href.split('next=')[0].split('email=')[1].split('&')[0]);
    setTimeout(function() { $('#cloginSubmit').trigger('click'); }, 100);
  }
  var mobileCheck = function() {
    // checks if browser is a mobile or tablet browser
    var check = false;
    (function(a){if(/(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows ce|xda|xiino|android|ipad|playbook|silk/i.test(a)||/1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s\-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|\-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw\-(n|u)|c55\/|capi|ccwa|cdm\-|cell|chtm|cldc|cmd\-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc\-s|devi|dica|dmob|do(c|p)o|ds(12|\-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(\-|_)|g1 u|g560|gene|gf\-5|g\-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd\-(m|p|t)|hei\-|hi(pt|ta)|hp( i|ip)|hs\-c|ht(c(\-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i\-(20|go|ma)|i230|iac( |\-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc\-|kyo(c|k)|le(no|xi)|lg( g|\/(k|l|u)|50|54|\-[a-w])|libw|lynx|m1\-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m\-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(\-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)\-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|\-([1-8]|c))|phil|pire|pl(ay|uc)|pn\-2|po(ck|rt|se)|prox|psio|pt\-g|qa\-a|qc(07|12|21|32|60|\-[2-7]|i\-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h\-|oo|p\-)|sdk\/|se(c(\-|0|1)|47|mc|nd|ri)|sgh\-|shar|sie(\-|m)|sk\-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h\-|v\-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl\-|tdg\-|tel(i|m)|tim\-|t\-mo|to(pl|sh)|ts(70|m\-|m3|m5)|tx\-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|\-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(\-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas\-|your|zeto|zte\-/i.test(a.substr(0,4))) check = true;})(navigator.userAgent||navigator.vendor||window.opera);
    return check;
  };
  var mobile = mobileCheck();
  var b = '.bk';
  if (navigator.userAgent.match(/chrome/i) && !navigator.userAgent.match(/edge/i) && !mobile) b = '.ch';
  if (navigator.userAgent.match(/firefox/i) && !mobile) b = '.ff';
  if (mobile) b = '.mob';
  $('.dl').hide();
  $('.dl'+b).show();
  $('#viewrequests').bind('click',function(e) {
    $(this).attr('href','/request?q=user.id:'+clogin.user.account._id);
  });
  var a = window.location.href.indexOf('a=') !== -1 ? window.location.href.split('a=')[1].split('&')[0] : undefined;
  if ( a && a.length > 0 ) $('#cloginSubmit').html(a.substring(0,1).toUpperCase() + a.substring(1,a.length).replace('nup','n up'));
});
</script>

<div class="container-fluid notcloggedin" id="cloginArea">
  <div class="row">
    <div class="col-md-6 col-md-offset-3">
      <div>
        <div id="cloginEmailArea">
          <h2 style="text-align:center;">Sign in to your account</h2>
          <p style="text-align:center;">
            No account yet? <br>
            Just enter your email address to get started.<br>
          </p>
          <input type="email" class="form-control" id="cloginEmail" name="email" placeholder="Enter your email address">
          <button id="cloginSubmit" type="submit" class="btn btn-action btn-block" style="margin-top:10px;">Sign up / Login</button>
          <div>
            <p style="text-align:center;margin-top:15px;">
              Or use your favourite service<br>
            </p>
            <p style="text-align:center; margin-top:15px;">
              <a id="cloginOauthGoogle" class="btn btn-default" style="font-size:0.8em;" href="#"><img style="height:20px;" src="https://static.cottagelabs.com/google.png"> Sign in with Google</a>
              <a id="cloginOauthFacebook" class="btn btn-default" style="font-size:0.8em;" href="#"><img style="height:20px;" src="https://static.cottagelabs.com/facebook.png"> Sign in with Facebook</a>
            </p>
          </div>
        </div>
        <div id="cloginTokenArea" style="display:none;">
          <h2 style="text-align:center;">Go check your email!</h2>
          <p style="text-align:center;">
            We use a password-free system.<br>
            It's more secure and means you have one less password to remember.
          </p>
          <p style="text-align:center;">
            We sent you a login code via email. Enter it below.
          </p>
          <input type="text" class="form-control" id="cloginToken" placeholder="Enter your login code">
          <p style="text-align:center;">
            <br>If you don't receive an email within a few minutes, check your spam folder. If you have trouble, try using Google or Facebook to login. Otherwise, Contact us at
            <a href="mailto:<EMAIL>?subject=issues signing in"><EMAIL></a>.
          </p>
        </div>
        <div id="cloginMessages" style="margin-top:5px;"></div>
        <div id="cloginLoading" style="display:none;"><img style="height:30px;" src="//static.cottagelabs.com/spinner.gif"></div>
      </div>


      <div class="row dl ch" id="install" style="margin-top:70px;margin-bottom:100px;">
        <div class="col-md-1 col-md-offset-1">
          <p style="font-size:40px;line-height:10px;color:#398bc5;text-align:center;">
            <i class="glyphicon glyphicon-download"></i>
          </p>
        </div>
        <div class="col-md-10">
          <p style="text-align:center;">
            Always have the button by your side.
            <a style="margin-top:5px;" class="chromeinstall" target="_blank" href="https://chrome.google.com/webstore/detail/open-access-button/gknkbkaapnhpmkcgkmdekdffgcddoiel">
            <br>Get the browser extension in one click.
            </a>
          </p>
        </div>
      </div>
    </div>
  </div>
</div>


<div class="container-fluid cloggedin" id="userinfo" style="display:none;">
  <div id="tonextalert" class="row" style="display:none;">
    <div class="col-md-8 col-md-offset-2">
      <div class="alert alert-info">
        <h4><a id="tonext" href="">Click here to return to the page you were viewing.</a></h4>
      </div>
    </div>
  </div>

  <div class="row">
    <div class="col-md-8 col-md-offset-2">
      <h2 id="sayhello">Hello <span class="username"></span></h2>
      <p id="apikey" style="display:none;"></p>

      <div id="setinfo" style="display:none;">
        <h1>Thanks for signing up!</h1>
        <p>We use these details during requests to help authors understand who you are, and motivate them to share.</p>
        <div class="row">
          <div class="col-md-6">
            <input style="margin-top:7px;" type="text" id="profile.firstname" name="first name" class="form-control cloginSave" placeholder="First name (required)">
          </div>
          <div class="col-md-6">
            <input style="margin-top:7px;" type="text" id="profile.lastname" name="last name" class="form-control cloginSave" placeholder="Family name (required)">
          </div>
        </div>
        <input style="margin-top:7px;" type="text" id="service.openaccessbutton.profile.affiliation" name="affiliation" class="form-control cloginSave" placeholder="Affiliation (University name, Business name etc)">
        <select id="service.openaccessbutton.profile.profession" name="profession" class="form-control cloginSave" style="margin-top:7px;">
          <option value="">Profession (required)</option>
          <option value="Student">Student</option>
          <option value="Health professional">Health professional</option>
          <option value="Patient">Patient</option>
          <option value="Researcher">Researcher</option>
          <option value="Librarian">Librarian</option>
          <option value="Other">Other</option>
        </select>
        <p id="agreeterms" style="margin-top:7px;">
          By signing up
          I understand that information obtained by the Button will be public, and that
          I agree to the Open Access Button
          <a target="_blank" href="/privacy" style="text-decoration:underline;">privacy policy</a>
          and
          <a target="_blank" href="/terms" style="text-decoration:underline;">terms of service.</a>
        </p>
        <input id="service.openaccessbutton.profile.confirm_public" type="checkbox" checked style="display:none;" class="cloginSave">
        <input id="service.openaccessbutton.profile.confirm_terms" type="checkbox" checked style="display:none;" class="cloginSave">
        <button id="cloginSave" type="button" class="btn btn-action" style="margin-top:5px;">Save your details</button>
        <div id="cloginSaveMessages"></div>
      </div>

    </div>
  </div>
</div>

<div class="container-fluid cloggedin" id="downloads" style="margin-bottom:200px;display:none;">
  <div class="row">
    <div class="col-md-8 col-md-offset-2">
      <h3>Get Started</h3>
      <div id="plugin_messages"></div>
      <a id="chromeinstall" style="margin-top:5px;" class="btn btn-action btn-block dl ch" target="_blank" href="https://chrome.google.com/webstore/detail/open-access-button/gknkbkaapnhpmkcgkmdekdffgcddoiel">Get the Chrome Extension</a>
      <a id="firefoxinstall" style="margin-top:5px;" class="btn btn-action btn-block dl ff disabled" target="_blank" href="https://addons.mozilla.org/en-GB/firefox/addon/openaccessbutton/">Firefox Plugin Coming Soon</a>
      <p class="dl mob">Doing research on the move? We'd like to make an app for your phone. But, right now you can use it in your browser. Check back when you're by your computer for our plugins.</p>
      <div class="well dl bk ff" style="margin:5px 0px 5px 0px;"> <!-- for now show bookmarklet on ff too -->
        <p>
        To install just drag the Button to your bookmarks bar.
        </p>
        <a id="bookmarklet" class="btn btn-action btn-block disabled" href="javascript:apikey='XXXX';document.getElementsByTagName('body')[0].appendChild(document.createElement('script')).setAttribute('src','YYYY/static/bookmarklet/includer.js?r='+Math.random());">Open Access Button</a>
        <p><small>Having trouble? See instructions for <a href="/bookmarklet_install_ie" target="_blank" >Internet Explorer</a>, <a href="/bookmarklet_install_ff" target="_blank" >Firefox</a> and <a href="/bookmarklet_install_safari" target="_blank" >Safari</a>. If your bookmarks bar is hidden here's how to show it:
                <br>
                Chrome, Safari and Internet Explorer: Control (Command on a Mac) + Shift + B
                <br>
                Firefox: Alt + V, then T, then B</small>
      </div>

      <!--<h3>Instructions</h3>
      <p>We’ve worked hard to make the Button easy to use. Here’s what you need to know:</p>
      <ol>
        <li>The Button works from <a href="https://en.wikipedia.org/wiki/Academic_journal"target="_blank" >academic journal articles</a>. Click the Button when you want the article or data supporting a paper.</li>
        <li>If you get an email from us, it’s important.</li>
        <li>If you need help, email us at <a href="mailto:<EMAIL>"><EMAIL></a></li>
      </ol>
      <p>Want to test it out? Try searching for <a href="http://science.sciencemag.org/content/293/5530/629" target="_blank">this article</a>.</p>-->
      <p><br><a id="cloginLogout" class="btn btn-warning" href="#">Logout</a></p>
    </div>
  </div>
</div>

{'fraction_non_alphanumeric': 0.20562335856635255, 'fraction_numerical': 0.019249188938668314, 'mean_word_length': 3.846660676849356, 'pattern_counts': {'":': 0, '<': 406, '<?xml version=': 0, '>': 410, 'https://': 20, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 18, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1637402', 'n_tokens_mistral': 11887, 'n_tokens_neox': 11454, 'n_words': 1971}