aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorStephen Blott2015-03-15 15:38:36 +0000
committerStephen Blott2015-03-15 15:38:36 +0000
commit5b84f5cf94d32b6e8be75448f9c06aa7f2068582 (patch)
tree7cc889d69e83791ceb6f1cbbe70c294319824a68
parentfb24c770645ce1b8178729d4be612d58497ffa5f (diff)
downloadvimium-5b84f5cf94d32b6e8be75448f9c06aa7f2068582.tar.bz2
Tidy up exclusion rules/propagation.
-rw-r--r--content_scripts/vimium_frontend.coffee6
-rw-r--r--pages/options.coffee2
2 files changed, 4 insertions, 4 deletions
diff --git a/content_scripts/vimium_frontend.coffee b/content_scripts/vimium_frontend.coffee
index b96157c1..d0fc158c 100644
--- a/content_scripts/vimium_frontend.coffee
+++ b/content_scripts/vimium_frontend.coffee
@@ -150,7 +150,7 @@ initializePreDomReady = ->
settings.load()
initializeModes()
- checkIfEnabledForUrl true # true means checkIfEnabledForUrl is being called on start up.
+ checkIfEnabledForUrl()
refreshCompletionKeys()
# Send the key to the key handler in the background page.
@@ -547,7 +547,7 @@ onKeyup = (event) ->
DomUtils.suppressPropagation(event)
@stopBubblingAndTrue
-checkIfEnabledForUrl = (onStartUp = false) ->
+checkIfEnabledForUrl = ->
url = window.location.toString()
chrome.runtime.sendMessage { handler: "isEnabledForUrl", url: url }, (response) ->
@@ -556,7 +556,7 @@ checkIfEnabledForUrl = (onStartUp = false) ->
isIncognitoMode = response.incognito
if isEnabledForUrl
initializeWhenEnabled()
- else if onStartUp and HUD.isReady()
+ else if HUD.isReady()
# Quickly hide any HUD we might already be showing, e.g. if we entered insert mode on page load.
HUD.hide()
handlerStack.bubbleEvent "registerStateChange",
diff --git a/pages/options.coffee b/pages/options.coffee
index f60f3bb4..6545189b 100644
--- a/pages/options.coffee
+++ b/pages/options.coffee
@@ -304,7 +304,7 @@ initPopupPage = ->
window.close()
# Populate options. Just one, here.
- exclusions = new ExclusionRulesOnPopupOption(url, "exclusionRules", onUpdated)
+ exclusions = new ExclusionRulesOnPopupOption url, "exclusionRules", onUpdated
updateState()
document.addEventListener "keyup", updateState