anchor.diff:              , case re:run(User_agent, ?MOBILE_UA_RE, [caseless])
                   of {match, _Match1} -> ok
                       , ?LOG_DEBUG("Mobile browser first match: ~s", [User_agent])
  -                    , mobile_futon(Req)
  +                    , mobile_futon(Req, Mobile_dir)
                   ; nomatch -> ok
                       , First_4 = string:substr(User_agent, 1, 4)
                       , case re:run(First_4, ?MOBILE_UA_TRUNC_RE, [caseless])
                           of {match, _Match2} -> ok
                               , ?LOG_DEBUG("Mobile browser second match: ~s", [User_agent])
  -                            , mobile_futon(Req)
  +                            , mobile_futon(Req, Mobile_dir)
                           ; nomatch -> ok
                               , ?LOG_DEBUG("Not a mobile browser: ~s", [User_agent])
                               , old_futon(Req)
  
positive.code:     .
  
  
  mobile_enabled_futon(#httpd{mochi_req=MochiReq}=Req) -> ok
      , case MochiReq:get_header_value("user-agent")
          of undefined -> ok
              , old_futon(Req)
  
negative.code:             , send_500(Req, "We screwed up! Please email support@iriscouch.com and we will fix it ASAP")
          ; Favicon_cfg -> ok
              , case couch_util:parse_term(Favicon_cfg)
                  of {ok, {_Mod, _Func, Futon_dir}} -> ok
                      %, ?LOG_DEBUG("~p:~p ~p", [Mod, Func, Futon_dir])
                      , send_from_dir(Req, Futon_dir)
                  ; _ -> ok
                      , ?LOG_ERROR("Bad favicon config: ~p", [Favicon_cfg])
                      , send_500(Req, "We screwed up! Please email support@iriscouch.com and we will fix it ASAP")
                  end
          end
      .
  
  
  send_from_dir(Req, Dir) -> ok
      , couch_httpd_misc_handlers:handle_utils_dir_req(Req, Dir)
      .
  
  %
  