aboutsummaryrefslogtreecommitdiffstats
path: root/popup.html
diff options
context:
space:
mode:
Diffstat (limited to 'popup.html')
-rw-r--r--popup.html5
1 files changed, 4 insertions, 1 deletions
diff --git a/popup.html b/popup.html
index e3feac44..bab3b7b6 100644
--- a/popup.html
+++ b/popup.html
@@ -12,7 +12,10 @@
<script type="text/javascript">
function onLoad() {
chrome.tabs.getSelected(null, function(tab) {
- document.getElementById("popupInput").value = tab.url;
+ // The common use case is to disable Vimium at the domain level.
+ // This regexp will match "http://www.example.com/" from "http://www.example.com/path/to/page.html".
+ var domain = tab.url.match(/[^\/]*\/\/[^\/]*\//) || tab.url;
+ document.getElementById("popupInput").value = domain + "*";
});
}