 onload = -> 
 
   Earl.root = get_script_attr('earl', 'root') or '/'
+  if Earl.root == true # earl attribute just set with no value
+    Earl.root = '/'
+
   if window.location.pathname.match('.html')
     Earl.root += location.pathname.match(/\/([\w-_]+\.html)/)[1] + '/'
   if Earl.root[0] != '/'

# Enables history aware link. Wraps basic dom.A.

if hist_aware

  window.dom = window.dom || {}

  dom.A = ->
    props = @props
    if @props.href
      href = @props.href


          href = @props.href = href.replace('//', '/')


      handle_click = (event) =>
        opened_in_new_tab = event.altKey  || \
                            event.ctrlKey || \
