class Bullet::Rack

def xhr_script(nonce = nil)

Make footer work for XHR requests by appending data to the footer
def xhr_script(nonce = nil)
  script = File.read("#{__dir__}/bullet_xhr.js")
  if nonce
    "<script type='text/javascript' nonce='#{nonce}'>#{script}</script>"
  else
    "<script type='text/javascript'>#{script}</script>"
  end
end