   scrollToBottom: ->
     Marks.setPreviousPosition()
     Scroller.scrollTo "y", "max"
+    return
   scrollToTop: (count) ->
     Marks.setPreviousPosition()
     Scroller.scrollTo "y", (count - 1) * Settings.get("scrollStepSize")
-  scrollToLeft: -> Scroller.scrollTo "x", 0
-  scrollToRight: -> Scroller.scrollTo "x", "max"
-  scrollUp: (count) -> Scroller.scrollBy "y", -1 * Settings.get("scrollStepSize") * count
-  scrollDown: (count) -> Scroller.scrollBy "y", Settings.get("scrollStepSize") * count
-  scrollPageUp: (count) -> Scroller.scrollBy "y", "viewSize", -1/2 * count
-  scrollPageDown: (count) -> Scroller.scrollBy "y", "viewSize", 1/2 * count
-  scrollFullPageUp: (count) -> Scroller.scrollBy "y", "viewSize", -1 * count
-  scrollFullPageDown: (count) -> Scroller.scrollBy "y", "viewSize", 1 * count
-  scrollLeft: (count) -> Scroller.scrollBy "x", -1 * Settings.get("scrollStepSize") * count
-  scrollRight: (count) -> Scroller.scrollBy "x", Settings.get("scrollStepSize") * count
+    return
+  scrollToLeft: -> Scroller.scrollTo "x", 0; return
+  scrollToRight: -> Scroller.scrollTo "x", "max"; return
+  scrollUp: (count) -> Scroller.scrollBy "y", -1 * Settings.get("scrollStepSize") * count; return
+  scrollDown: (count) -> Scroller.scrollBy "y", Settings.get("scrollStepSize") * count; return
+  scrollPageUp: (count) -> Scroller.scrollBy "y", "viewSize", -1/2 * count; return
+  scrollPageDown: (count) -> Scroller.scrollBy "y", "viewSize", 1/2 * count; return
+  scrollFullPageUp: (count) -> Scroller.scrollBy "y", "viewSize", -1 * count; return
+  scrollFullPageDown: (count) -> Scroller.scrollBy "y", "viewSize", 1 * count; return
+  scrollLeft: (count) -> Scroller.scrollBy "x", -1 * Settings.get("scrollStepSize") * count; return
+  scrollRight: (count) -> Scroller.scrollBy "x", Settings.get("scrollStepSize") * count; return
 
   # Tab navigation: back, forward.
-  goBack: (count) -> history.go(-count)
-  goForward: (count) -> history.go(count)
+  goBack: (count) -> history.go(-count); return
+  goForward: (count) -> history.go(count); return
 
   # Url manipulation.
   goUp: (count) ->
     url = window.location.href
-    if (url[url.length - 1] == "/")
+    if (url.endsWith("/"))
       url = url.substring(0, url.length - 1)
 
     urlsplit = url.split("/")

    linkMatches = false
    for linkString in linkStrings
      if link.innerText.toLowerCase().indexOf(linkString) != -1 ||
          0 <= link.value?.indexOf? linkString
        linkMatches = true
        break
    continue unless linkMatches

    candidateLinks.push(link)

  return if (candidateLinks.length == 0)

  for link in candidateLinks
    link.wordCount = link.innerText.trim().split(/\s+/).length

    "(" + textInputTypes.map((type) -> '@type="' + type + '"').join(" or ") + "or not(@type))" +
    " and not(@disabled or @readonly)]",
    "textarea", "*[@contenteditable='' or translate(@contenteditable, 'TRUE', 'true')='true']"]
  if DomUtils?
    DomUtils.makeXPath(inputElements)
)()

# used by the findAndFollow* functions.
