From e38297a784773679d2b896b3fc20152c6f675fdb Mon Sep 17 00:00:00 2001 From: Phil Crosby Date: Wed, 30 Dec 2009 12:44:23 -0500 Subject: Add a UI in the settings page for excluding URLs --- settings.html | 49 +++++++++++++++++++++++++++++++++++++++---------- 1 file changed, 39 insertions(+), 10 deletions(-) (limited to 'settings.html') diff --git a/settings.html b/settings.html index 7474dd0f..7ae2c3cd 100644 --- a/settings.html +++ b/settings.html @@ -4,7 +4,7 @@ @@ -28,30 +41,30 @@ // Saves options to localStorage. function saveOptions() { - var scrollStepSize = document.getElementById("scrollStepSize").value; - localStorage["scrollStepSize"] = scrollStepSize; + localStorage["scrollStepSize"] = document.getElementById("scrollStepSize").value + localStorage["defaultZoomLevel"] = document.getElementById("defaultZoomLevel").value + localStorage["excludedUrls"] = document.getElementById("excludedUrls").value; - var defaultZoomLevel = document.getElementById("defaultZoomLevel").value; - localStorage["defaultZoomLevel"] = defaultZoomLevel; - - // Update status to let user know options were saved. + // Give the user some feedback that their options were saved. var status = document.getElementById("status"); status.innerHTML = "Settings Saved."; setTimeout(function() { status.innerHTML = ""; }, 750); } // Restores select box state to saved value from localStorage. - function restoreOptions() { + function populateOptions() { // TODO(ilya): Create a single option list with defaults somewhere to share across various scripts. var scrollStepSize = localStorage["scrollStepSize"] || 60; var defaultZoomLevel = localStorage["defaultZoomLevel"] || 100; + var defaultExcludedUrls = localStorage["excludedUrls"] || ""; document.getElementById("scrollStepSize").value = scrollStepSize; document.getElementById("defaultZoomLevel").value = defaultZoomLevel; + document.getElementById("excludedUrls").value = defaultExcludedUrls; } - +

Vimium - Settings

@@ -64,8 +77,24 @@ + + +
% (default: 100)
+
+ Excluded URLs
+
+
+ e.g. http*://mail.google.com/*
+ This will disable Vimium on Gmail.

+ Enter one URL per line.
+
+
+ +
+
+ -- cgit v1.2.3