class Jekyll::Commands::Serve::SkipAnalyzer

to insert the LiveReload script tags
This class is used to determine if the Servlet should modify a served file

def self.skip_processing?(request, response, options)

def self.skip_processing?(request, response, options)
  new(request, response, options).skip_processing?
end

def bad_browser?

def bad_browser?
  BAD_USER_AGENTS.any? { |pattern| pattern.match?(@request["User-Agent"]) }
end

def chunked?

def chunked?
  @response["Transfer-Encoding"] == "chunked"
end

def html?

def html?
  @response["Content-Type"].to_s.include?("text/html")
end

def initialize(request, response, options)

def initialize(request, response, options)
  @options = options
  @request = request
  @response = response
end

def inline?

def inline?
  @response["Content-Disposition"].to_s.start_with?("inline")
end

def skip_processing?

def skip_processing?
  !html? || chunked? || inline? || bad_browser?
end