diff options
Diffstat (limited to 'content_scripts')
| -rw-r--r-- | content_scripts/link_hints.coffee | 22 | ||||
| -rw-r--r-- | content_scripts/vimium_frontend.coffee | 14 | ||||
| -rw-r--r-- | content_scripts/vomnibar.coffee | 1 | 
3 files changed, 18 insertions, 19 deletions
| diff --git a/content_scripts/link_hints.coffee b/content_scripts/link_hints.coffee index 1d5d668a..831408e2 100644 --- a/content_scripts/link_hints.coffee +++ b/content_scripts/link_hints.coffee @@ -34,10 +34,10 @@ LinkHints =    # We use translate() instead of lower-case() because Chrome only supports XPath 1.0.    #    clickableElementsXPath: DomUtils.makeXPath( -      ["a", "area[@href]", "textarea", "button", "select", -       "input[not(@type='hidden' or @disabled or @readonly)]", -       "*[@onclick or @tabindex or @role='link' or @role='button' or contains(@class, 'button') or " + -       "@contenteditable='' or translate(@contenteditable, 'TRUE', 'true')='true']"]) +    ["a", "area[@href]", "textarea", "button", "select", +     "input[not(@type='hidden' or @disabled or @readonly)]", +     "*[@onclick or @tabindex or @role='link' or @role='button' or contains(@class, 'button') or " + +     "@contenteditable='' or translate(@contenteditable, 'TRUE', 'true')='true']"])    # We need this as a top-level function because our command system doesn't yet support arguments.    activateModeToOpenInNewTab: -> @activateMode(true, false, false) @@ -80,8 +80,8 @@ LinkHints =        else if (withQueue)          HUD.show("Open multiple links in a new tab")        @linkActivator = (link) -> -        # When "clicking" on a link, dispatch the event with the appropriate meta key (CMD on Mac, CTRL on windows) -        # to open it in a new tab if necessary. +        # When "clicking" on a link, dispatch the event with the appropriate meta key (CMD on Mac, CTRL on +        # windows) to open it in a new tab if necessary.          DomUtils.simulateClick(link, {            metaKey: KeyboardUtils.platform == "Mac",            ctrlKey: KeyboardUtils.platform != "Mac" }) @@ -211,7 +211,7 @@ LinkHints =    #    showMarker: (linkMarker, matchingCharCount) ->      linkMarker.style.display = "" -    # TODO(philc):  +    # TODO(philc):      for j in [0...linkMarker.childNodes.length]        if (j < matchingCharCount)          linkMarker.childNodes[j].classList.add("matchingCharacter") @@ -269,8 +269,8 @@ alphabetHints =      digitsNeeded = Math.ceil(@logXOfBase(linkCount, linkHintCharacters.length))      # Short hints are the number of hints we can possibly show which are (digitsNeeded - 1) digits in length.      shortHintCount = Math.floor( -        (Math.pow(linkHintCharacters.length, digitsNeeded) - linkCount) / -        linkHintCharacters.length) +      (Math.pow(linkHintCharacters.length, digitsNeeded) - linkCount) / +      linkHintCharacters.length)      longHintCount = linkCount - shortHintCount      hintStrings = [] @@ -299,8 +299,8 @@ alphabetHints =      result    # -  # Converts a number like "8" into a hint string like "JK". This is used to sequentially generate all of -  # the hint text. The hint string will be "padded with zeroes" to ensure its length is equal to numHintDigits. +  # Converts a number like "8" into a hint string like "JK". This is used to sequentially generate all of the +  # hint text. The hint string will be "padded with zeroes" to ensure its length is equal to numHintDigits.    #    numberToHintString: (number, numHintDigits, characterSet) ->      base = characterSet.length diff --git a/content_scripts/vimium_frontend.coffee b/content_scripts/vimium_frontend.coffee index ab3b1fbf..adec11c5 100644 --- a/content_scripts/vimium_frontend.coffee +++ b/content_scripts/vimium_frontend.coffee @@ -295,8 +295,8 @@ extend window,        chrome.extension.sendRequest({ handler: "openUrlInNewTab", url: url, selected: true })    copyCurrentUrl: -> -    # TODO(ilya): When the following bug is fixed, revisit this approach of sending back to the background page -    # to copy. +    # TODO(ilya): When the following bug is fixed, revisit this approach of sending back to the background +    # page to copy.      # http://code.google.com/p/chromium/issues/detail?id=55188      chrome.extension.sendRequest { handler: "getCurrentTabUrl" }, (url) ->        chrome.extension.sendRequest { handler: "copyToClipboard", data: url } @@ -895,9 +895,9 @@ window.showHelpDialog = (html, fid) ->        this.dialogElement.style.maxHeight = window.innerHeight - 80        this.showAdvancedCommands(this.getShowAdvancedCommands()) -    #  +    #      # Advanced commands are hidden by default so they don't overwhelm new and casual users. -    #  +    #      toggleAdvancedCommands: (event) ->        event.preventDefault()        showAdvanced = VimiumHelpDialog.getShowAdvancedCommands() @@ -958,9 +958,9 @@ HUD =      HUD.displayElement().style.display = ""    showUpgradeNotification: (version) -> -    HUD.upgradeNotificationElement().innerHTML = "Vimium has been updated to " + -      "<a class='vimiumReset' href='https://chrome.google.com/extensions/detail/dbepggeogbaibhgnhhndojpepiihcmeb'>" + -      version + "</a>.<a class='vimiumReset close-button' href='#'>x</a>" +    HUD.upgradeNotificationElement().innerHTML = "Vimium has been updated to  +      <a class='vimiumReset' href='https://chrome.google.com/extensions/detail/dbepggeogbaibhgnhhndojpepiihcmeb'> +      #{version}</a>.<a class='vimiumReset close-button' href='#'>x</a>"      links = HUD.upgradeNotificationElement().getElementsByTagName("a")      links[0].addEventListener("click", HUD.onUpdateLinkClicked, false)      links[1].addEventListener "click", (event) -> diff --git a/content_scripts/vomnibar.coffee b/content_scripts/vomnibar.coffee index 9c1e7a31..1b2af1c4 100644 --- a/content_scripts/vomnibar.coffee +++ b/content_scripts/vomnibar.coffee @@ -172,7 +172,6 @@ class VomnibarUI      @input = document.querySelector("#vomnibar input")      @input.addEventListener "input", => @update() -    console.log("@input:", @input);      @completionList = document.querySelector("#vomnibar ul")      @completionList.style.display = "none" | 
