       delete this.data.id
     _L.show '#_oab_error', '<p><span>&#10060;</span> Sorry please provide ' + if this.plugin is 'instantill' then 'the full DOI, title, citation, PMID or PMC ID.</p>' else 'a valid DOI.</p>'
   else
-    this.state() # should this just be part of loading?
+    this.state()
     this.loading()
     this.data.config = this.config
     this.data.from ?= this.uid

    <p>All that\'s left to do is wait. Once the journal gives you permission to share, come back and we\'ll help you finish the job.</p>
  </div>
  
  <p><a href="#" class="_oab_restart _oab_button" id="_oab_done_restart">Do another</a></p>
</div>
<div id="_oab_error"></div>
<div id="_oab_pilot"></div>'

_oab.prototype.state = (pop) ->
  if this.pushstate
    try
      u = window.location.pathname
      if not pop?
        if window.location.href.indexOf('shareyourpaper.org') isnt -1 and this.data.doi?
          u = window.location.pathname.split('/10.')[0] + '/' + this.data.doi + window.location.search + window.location.hash
        else if window.location.href.indexOf('/setup') is -1 and window.location.href.indexOf('/demo') is -1
          if this.data.doi? or this.data.title? or this.data.url?
            k = if this.data.doi then 'doi' else if this.data.title then 'title' else 'url'
            u += window.location.search.split('?' + k + '=')[0].split('&' + k + '=')[0]
            u += if u.indexOf('?') is -1 then '?' else '&'
            u += k + '=' + this.data[k] + window.location.hash
      window.history.pushState "", (if pop? then "search" else "find"), u
      if pop?
        # what to do with the pop event? for now just triggers a restart if user tries to go back
        this.restart()

_oab.prototype.restart = (e, val) ->
  try e.preventDefault()
