aboutsummaryrefslogtreecommitdiffstats
path: root/content_scripts/vimium_frontend.coffee
diff options
context:
space:
mode:
authorTimo Sand2013-02-16 22:39:39 +0000
committerTimo Sand2013-02-16 22:39:39 +0000
commitb466d26ee559bf97e1cbf0cfd77ec0aa1d40a104 (patch)
treec645250d504823a897115458dfafa449e26e058f /content_scripts/vimium_frontend.coffee
parentc781ce942e225c9bc9f172cea54e0e7de6e4bcd0 (diff)
downloadvimium-b466d26ee559bf97e1cbf0cfd77ec0aa1d40a104.tar.bz2
Added `gU` command to go to root of page including current port and protocol
Diffstat (limited to 'content_scripts/vimium_frontend.coffee')
-rw-r--r--content_scripts/vimium_frontend.coffee10
1 files changed, 10 insertions, 0 deletions
diff --git a/content_scripts/vimium_frontend.coffee b/content_scripts/vimium_frontend.coffee
index ca7af5ae..34635323 100644
--- a/content_scripts/vimium_frontend.coffee
+++ b/content_scripts/vimium_frontend.coffee
@@ -246,6 +246,16 @@ extend window,
urlsplit = urlsplit.slice(0, Math.max(3, urlsplit.length - count))
window.location.href = urlsplit.join('/')
+ goRoot: (count) ->
+ host = window.location.hostname
+ port = window.location.port
+ protocol = window.location.protocol
+
+ url = protocol + "//" + host
+ if port
+ url += ":" + port
+ window.location.href = url
+
toggleViewSource: ->
chrome.extension.sendRequest { handler: "getCurrentTabUrl" }, (url) ->
if (url.substr(0, 12) == "view-source:")