aboutsummaryrefslogtreecommitdiffstats
path: root/vimiumFrontend.js
diff options
context:
space:
mode:
Diffstat (limited to 'vimiumFrontend.js')
-rw-r--r--vimiumFrontend.js4
1 files changed, 2 insertions, 2 deletions
diff --git a/vimiumFrontend.js b/vimiumFrontend.js
index e3c28371..a18c7966 100644
--- a/vimiumFrontend.js
+++ b/vimiumFrontend.js
@@ -266,7 +266,7 @@ function reload() { window.location.reload(); }
function goBack() { history.back(); }
function goForward() { history.forward(); }
-function goUp() {
+function goUp(count) {
var url = window.location.href;
if (url[url.length-1] == '/')
url = url.substring(0, url.length - 1);
@@ -274,7 +274,7 @@ function goUp() {
var urlsplit = url.split('/');
// make sure we haven't hit the base domain yet
if (urlsplit.length > 3) {
- delete urlsplit[urlsplit.length-1];
+ urlsplit = urlsplit.slice(0, Math.max(3, urlsplit.length - count));
window.location.href = urlsplit.join('/');
}
}