           window.open(href, '_blank')
       else if download.test(href)
         if document.cookie.indexOf('donation') is -1
-          content = href.match(/exports\/([^\/:]+).(pdf|epub|zip)/)
+          content = href.match(exports)
           router.navigate("/donate/download/#{content[1]}/#{content[2]}", {trigger: true})
         else
           downloadUrl(href)

      href = $this.attr('href')

      # Only handle links intended to be processed by Backbone
      if e.isDefaultPrevented() or href.charAt(0) is '#' or /^mailto:.+/.test(href) then return

      e.preventDefault()


    download = /^\/(exports)\//
    external = /^((f|ht)tps?:)?\/\//
    resources = /\/(resources|exports)\//
    mailto = /^mailto:(.+)/
    exports = /exports\/([^\/:]+).(pdf|epub|zip)/

    # Catch internal application links and let Backbone handle the routing
    $(document).on 'click', 'a[href]:not([data-bypass]):not([href^="#"])', (e) ->
