<commit_before>class General

  constructor: () ->
    # // scroll to top (hide bar in ios)
    window.scrollTo(0, 1)

    window.onresize = () =>
      @resizeSVG()

    window.setTimeout(
        () =>
          @toggleAppMenu()
        , 1000
    )
    $("#link-nav-menu").on("click", @toggleAppMenu)
    $("#link-login").on("click", @toggleSigninPopup)
    $("#link-view-inspections").on("click", @toggleProgressPopup)
    $("#task-container .shown").on("click", @onTaskClick)
    $("body").on("click", @onBodyClick)

    @activateSlideshow()

    if (window.innerWidth < 500)
      document.title = "Bldg Inspector"

    overrides = [
      ".slide a"
      ".popup-link"
      "#home-logo"
      "#link-help"
      "#link-about"
      "#logout-link"
      ".home-link"
      # "#top-nav.open .task-link"
      ".score-save-link"
      ".sign-in-link"
      ".score-link"
      ".legend-link"
      "#link-try"
      "#link-back"
    ]
    @mobileClick id for id in overrides

  activateSlideshow: () ->
    $("#home-slideshow").swipeshow(
      autostart: true
      mouse: false
      initial: 0
      speed: 700
      interval: 6000
      onactivate: (slide, index) ->
        # console.log "activate", slide, index
        $("#slide-buttons a").removeClass("active")
        $("#link-geometry").addClass("active") if index==0
        $("#link-polygonfix").addClass("active") if index==1
        $("#link-address").addClass("active") if index==2
    )
    $("#link-geometry").on("mouseover", ()->
      $("#home-slideshow").swipeshow().goTo(0)
    )<commit_msg>fixed tap bug in mobile<commit_after>class General

  constructor: () ->
    # // scroll to top (hide bar in ios)
    window.scrollTo(0, 1)

    window.onresize = () =>
      @resizeSVG()

    window.setTimeout(
        () =>
          @toggleAppMenu()
        , 1000
    )
    $("#link-nav-menu").on("click", @toggleAppMenu)
    $("#link-login").on("click", @toggleSigninPopup)
    $("#link-view-inspections").on("click", @toggleProgressPopup)
    $("#task-container .shown").on("click", @onTaskClick)
    $("body").on("click", @onBodyClick)

    @activateSlideshow()

    if (window.innerWidth < 500)
      document.title = "Bldg Inspector"

    overrides = [
      ".slide a"
      ".popup-link"
      "#home-logo"
      "#link-help"
      "#link-about"
      "#logout-link"
      ".home-link"
      "#top-nav.open .task-link"
      ".score-save-link"
      ".sign-in-link"
      ".score-link"
      ".legend-link"
      "#link-try"
      "#link-back"
    ]
    @mobileClick id for id in overrides

  activateSlideshow: () ->
    $("#home-slideshow").swipeshow(
      autostart: true
      mouse: false
      initial: 0
      speed: 700
      interval: 6000
      onactivate: (slide, index) ->
        # console.log "activate", slide, index
        $("#slide-buttons a").removeClass("active")
        $("#link-geometry").addClass("active") if index==0
        $("#link-polygonfix").addClass("active") if index==1
        $("#link-address").addClass("active") if index==2
    )
    $("#link-geometry").on("mouseover", ()->
      $("#home-slideshow").swipeshow().goTo(0)
    )
{'fraction_non_alphanumeric': 0.19040050858232677, 'fraction_numerical': 0.013350286077558804, 'mean_word_length': 2.347872340425532, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 15, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4316128', 'n_tokens_mistral': 1054, 'n_tokens_neox': 1043, 'n_words': 184}