diff options
| -rw-r--r-- | pages/options.coffee | 11 | 
1 files changed, 6 insertions, 5 deletions
| diff --git a/pages/options.coffee b/pages/options.coffee index 529743f4..9e95bcd3 100644 --- a/pages/options.coffee +++ b/pages/options.coffee @@ -277,11 +277,8 @@ initPopupPage = ->      exclusions = null      document.getElementById("optionsLink").setAttribute "href", chrome.runtime.getURL("pages/options.html") -    # As the active URL, we choose the most recently registered URL from a frame in the tab, or the tab's own -    # URL. -    url = chrome.extension.getBackgroundPage().urlForTab[tab.id] || tab.url - -    unless chrome.extension.getBackgroundPage().portsForTab[tab.id] +    tabPorts = chrome.extension.getBackgroundPage().portsForTab[tab.id] +    unless tabPorts and Object.keys(tabPorts).length > 0        # The browser has disabled Vimium on this page. Place a message explaining this into the popup.        document.body.innerHTML = """          <div style="width: 400px; margin: 5px;"> @@ -300,6 +297,10 @@ initPopupPage = ->        """        return +    # As the active URL, we choose the most recently registered URL from a frame in the tab, or the tab's own +    # URL. +    url = chrome.extension.getBackgroundPage().urlForTab[tab.id] || tab.url +      updateState = ->        rule = bgExclusions.getRule url, exclusions.readValueFromElement()        $("state").innerHTML = "Vimium will " + | 
