diff options
| author | Stephen Blott | 2014-12-21 14:26:41 +0000 | 
|---|---|---|
| committer | Stephen Blott | 2014-12-21 14:37:19 +0000 | 
| commit | feab329b9fc40463e185ce50a81ca0c3f35c813f (patch) | |
| tree | b5bd1d5b563eda1bf7a6b3393ca3e757fb13c02e /pages/options.coffee | |
| parent | 30ea18e3c8c59b7579dac57c83812a0306cefe5c (diff) | |
| download | vimium-feab329b9fc40463e185ce50a81ca0c3f35c813f.tar.bz2 | |
Exclusion; fiddle with styling.
Diffstat (limited to 'pages/options.coffee')
| -rw-r--r-- | pages/options.coffee | 23 | 
1 files changed, 8 insertions, 15 deletions
diff --git a/pages/options.coffee b/pages/options.coffee index eefac48b..249677be 100644 --- a/pages/options.coffee +++ b/pages/options.coffee @@ -254,23 +254,17 @@ initOptionsPage = ->  initPopupPage = ->    chrome.tabs.getSelected null, (tab) ->      exclusions = null -    console.log tab.url -    hasChromePrefix = bgUtils.hasChromePrefix tab.url      document.getElementById("optionsLink").setAttribute "href", chrome.runtime.getURL("pages/options.html")      updateState = -> -      rules = exclusions.readValueFromElement() -      isEnabled = bgExclusions.getRule tab.url, rules -      console.log hasChromePrefix -      $("state").innerHTML = -        if hasChromePrefix -          "Vimium cannot run on this page." -        else if isEnabled and isEnabled.passKeys -          "Excluded: <strong class='code'>#{isEnabled.passKeys}</strong>" -        else if isEnabled -          "Disabled" +      rule = bgExclusions.getRule tab.url, exclusions.readValueFromElement() +      $("state").innerHTML = "Vimium will " + +        if rule and rule.passKeys +          "exclude <span class='code'>#{rule.passKeys}</span>" +        else if rule +          "be disabled"          else -          "Enabled" +          "be enabled"      onUpdated = ->        $("helpText").innerHTML = "Type <strong>Ctrl-Enter</strong> to save and close." @@ -280,8 +274,7 @@ initPopupPage = ->      saveOptions = ->        Option.saveOptions() -      $("helpText").innerHTML = "Rules saved." -      $("saveOptions").innerHTML = "No Changes" +      $("saveOptions").innerHTML = "Saved"        $("saveOptions").disabled = true        chrome.tabs.query { windowId: chrome.windows.WINDOW_ID_CURRENT, active: true }, (tabs) ->          chrome.extension.getBackgroundPage().updateActiveState(tabs[0].id)  | 
