diff options
| author | Jez Ng | 2013-03-06 04:25:23 -0500 |
|---|---|---|
| committer | Jez Ng | 2013-03-06 04:25:23 -0500 |
| commit | 25c871c9bfc15278d72b9d0b2821b92627a605c6 (patch) | |
| tree | 7936f3212a76b6ef72f5feada6144f2e19b01465 /content_scripts | |
| parent | 4c5fcc544f016c0f06dfa548bd46bd4f6e46eeda (diff) | |
| parent | 22093e34ab94bbdab4059f197a67f8b57dd0b99e (diff) | |
| download | vimium-25c871c9bfc15278d72b9d0b2821b92627a605c6.tar.bz2 | |
Merge remote-tracking branch 'deiga/patch-4'
Conflicts:
background_scripts/commands.coffee
Diffstat (limited to 'content_scripts')
| -rw-r--r-- | content_scripts/link_hints.coffee | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/content_scripts/link_hints.coffee b/content_scripts/link_hints.coffee index 1f5e5d05..ad4a2686 100644 --- a/content_scripts/link_hints.coffee +++ b/content_scripts/link_hints.coffee @@ -12,6 +12,7 @@ OPEN_IN_CURRENT_TAB = {} OPEN_IN_NEW_TAB = {} OPEN_WITH_QUEUE = {} COPY_LINK_URL = {} +OPEN_INCOGNITO_WINDOW = {} LinkHints = hintMarkerContainingDiv: null @@ -48,6 +49,7 @@ LinkHints = activateModeToOpenInNewTab: -> @activateMode(OPEN_IN_NEW_TAB) activateModeToCopyLinkUrl: -> @activateMode(COPY_LINK_URL) activateModeWithQueue: -> @activateMode(OPEN_WITH_QUEUE) + activateModeToOpenIncognitoWindow: -> @activateMode(OPEN_INCOGNITO_WINDOW) activateMode: (mode = OPEN_IN_CURRENT_TAB) -> # we need documentElement to be ready in order to append links @@ -90,6 +92,13 @@ LinkHints = HUD.show("Copy link URL to Clipboard") @linkActivator = (link) -> chrome.extension.sendRequest({handler: "copyToClipboard", data: link.href}) + else if @mode is OPEN_INCOGNITO_WINDOW + HUD.show("Open link in incognito window") + + @linkActivator = (link) -> + chrome.extension.sendMessage( + handler: 'openUrlInIncognitoWindow' + url: link.href) else # OPEN_IN_CURRENT_TAB HUD.show("Open link in current tab") # When we're opening the link in the current tab, don't navigate to the selected link immediately |
